mirror of
https://github.com/esphome/esphome.git
synced 2024-11-21 22:48:10 +01:00
Format test files (#4541)
This commit is contained in:
parent
01687a9d57
commit
6471361715
7 changed files with 69 additions and 78 deletions
|
@ -325,7 +325,7 @@ mcp23s17:
|
|||
|
||||
sensor:
|
||||
- platform: internal_temperature
|
||||
name: "Internal Temperature"
|
||||
name: Internal Temperature
|
||||
- platform: ble_client
|
||||
type: characteristic
|
||||
ble_client_id: ble_foo
|
||||
|
@ -3239,25 +3239,25 @@ lcd_menu:
|
|||
lambda: 'ESP_LOGI("lcd_menu", "root leave");'
|
||||
items:
|
||||
- type: back
|
||||
text: 'Back'
|
||||
text: Back
|
||||
- type: label
|
||||
- type: menu
|
||||
text: 'Submenu 1'
|
||||
text: Submenu 1
|
||||
items:
|
||||
- type: back
|
||||
text: 'Back'
|
||||
text: Back
|
||||
- type: menu
|
||||
text: 'Submenu 21'
|
||||
text: Submenu 21
|
||||
items:
|
||||
- type: back
|
||||
text: 'Back'
|
||||
text: Back
|
||||
- type: command
|
||||
text: 'Show Main'
|
||||
text: Show Main
|
||||
on_value:
|
||||
then:
|
||||
- display_menu.show_main:
|
||||
- type: select
|
||||
text: 'Enum Item'
|
||||
text: Enum Item
|
||||
immediate_edit: true
|
||||
select: test_select
|
||||
on_enter:
|
||||
|
@ -3270,7 +3270,7 @@ lcd_menu:
|
|||
then:
|
||||
lambda: 'ESP_LOGI("lcd_menu", "select value: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
|
||||
- type: number
|
||||
text: 'Number'
|
||||
text: Number
|
||||
number: test_number
|
||||
on_enter:
|
||||
then:
|
||||
|
@ -3282,15 +3282,15 @@ lcd_menu:
|
|||
then:
|
||||
lambda: 'ESP_LOGI("lcd_menu", "number value: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
|
||||
- type: command
|
||||
text: 'Hide'
|
||||
text: Hide
|
||||
on_value:
|
||||
then:
|
||||
- display_menu.hide:
|
||||
- type: switch
|
||||
text: 'Switch'
|
||||
text: Switch
|
||||
switch: my_switch
|
||||
on_text: 'Bright'
|
||||
off_text: 'Dark'
|
||||
on_text: Bright
|
||||
off_text: Dark
|
||||
immediate_edit: false
|
||||
on_value:
|
||||
then:
|
||||
|
|
|
@ -399,7 +399,7 @@ sensor:
|
|||
time:
|
||||
- platform: homeassistant
|
||||
on_time:
|
||||
- at: '16:00:00'
|
||||
- at: "16:00:00"
|
||||
then:
|
||||
- logger.log: It's 16:00
|
||||
|
||||
|
@ -518,7 +518,6 @@ ble_client:
|
|||
- mac_address: 01:02:03:04:05:06
|
||||
id: radon_eye_ble_id
|
||||
|
||||
|
||||
airthings_ble:
|
||||
|
||||
radon_eye_ble:
|
||||
|
@ -535,7 +534,7 @@ bluetooth_proxy:
|
|||
xiaomi_rtcgq02lm:
|
||||
- id: motion_rtcgq02lm
|
||||
mac_address: 01:02:03:04:05:06
|
||||
bindkey: '48403ebe2d385db8d0c187f81e62cb64'
|
||||
bindkey: "48403ebe2d385db8d0c187f81e62cb64"
|
||||
|
||||
status_led:
|
||||
pin: GPIO2
|
||||
|
|
|
@ -54,7 +54,7 @@ api:
|
|||
- logger.log: Something happened
|
||||
- stepper.set_target:
|
||||
id: my_stepper2
|
||||
target: !lambda 'return int_;'
|
||||
target: !lambda "return int_;"
|
||||
- service: array_types
|
||||
variables:
|
||||
bool_arr: bool[]
|
||||
|
@ -64,7 +64,7 @@ api:
|
|||
then:
|
||||
- logger.log:
|
||||
# yamllint disable rule:line-length
|
||||
format: 'Bool: %s (%u), Int: %d (%u), Float: %f (%u), String: %s (%u)'
|
||||
format: "Bool: %s (%u), Int: %d (%u), Float: %f (%u), String: %s (%u)"
|
||||
# yamllint enable rule:line-length
|
||||
args:
|
||||
- YESNO(bool_arr[0])
|
||||
|
@ -85,30 +85,30 @@ api:
|
|||
variables:
|
||||
file: int
|
||||
then:
|
||||
- dfplayer.play: !lambda 'return file;'
|
||||
- dfplayer.play: !lambda "return file;"
|
||||
- service: dfplayer_play_loop
|
||||
variables:
|
||||
file: int
|
||||
loop_: bool
|
||||
then:
|
||||
- dfplayer.play:
|
||||
file: !lambda 'return file;'
|
||||
loop: !lambda 'return loop_;'
|
||||
file: !lambda "return file;"
|
||||
loop: !lambda "return loop_;"
|
||||
- service: dfplayer_play_folder
|
||||
variables:
|
||||
folder: int
|
||||
file: int
|
||||
then:
|
||||
- dfplayer.play_folder:
|
||||
folder: !lambda 'return folder;'
|
||||
file: !lambda 'return file;'
|
||||
folder: !lambda "return folder;"
|
||||
file: !lambda "return file;"
|
||||
|
||||
- service: dfplayer_play_loo_folder
|
||||
variables:
|
||||
folder: int
|
||||
then:
|
||||
- dfplayer.play_folder:
|
||||
folder: !lambda 'return folder;'
|
||||
folder: !lambda "return folder;"
|
||||
loop: true
|
||||
|
||||
- service: dfplayer_set_device
|
||||
|
@ -122,13 +122,13 @@ api:
|
|||
variables:
|
||||
volume: int
|
||||
then:
|
||||
- dfplayer.set_volume: !lambda 'return volume;'
|
||||
- dfplayer.set_volume: !lambda "return volume;"
|
||||
- service: dfplayer_set_eq
|
||||
variables:
|
||||
preset: int
|
||||
then:
|
||||
# yamllint disable rule:line-length
|
||||
- dfplayer.set_eq: !lambda 'return static_cast<dfplayer::EqPreset>(preset);'
|
||||
- dfplayer.set_eq: !lambda "return static_cast<dfplayer::EqPreset>(preset);"
|
||||
# yamllint enable rule:line-length
|
||||
|
||||
- service: dfplayer_sleep
|
||||
|
@ -169,21 +169,21 @@ api:
|
|||
then:
|
||||
- tm1651.set_level_percent:
|
||||
id: tm1651_battery
|
||||
level_percent: !lambda 'return level_percent;'
|
||||
level_percent: !lambda "return level_percent;"
|
||||
- service: battery_level
|
||||
variables:
|
||||
level: int
|
||||
then:
|
||||
- tm1651.set_level:
|
||||
id: tm1651_battery
|
||||
level: !lambda 'return level;'
|
||||
level: !lambda "return level;"
|
||||
- service: battery_brightness
|
||||
variables:
|
||||
brightness: int
|
||||
then:
|
||||
- tm1651.set_brightness:
|
||||
id: tm1651_battery
|
||||
brightness: !lambda 'return brightness;'
|
||||
brightness: !lambda "return brightness;"
|
||||
- service: battery_turn_on
|
||||
then:
|
||||
- tm1651.turn_on:
|
||||
|
@ -205,8 +205,8 @@ api:
|
|||
num_scans: int
|
||||
then:
|
||||
- fingerprint_grow.enroll:
|
||||
finger_id: !lambda 'return finger_id;'
|
||||
num_scans: !lambda 'return num_scans;'
|
||||
finger_id: !lambda "return finger_id;"
|
||||
num_scans: !lambda "return num_scans;"
|
||||
- service: fingerprint_grow_cancel_enroll
|
||||
then:
|
||||
- fingerprint_grow.cancel_enroll:
|
||||
|
@ -215,14 +215,14 @@ api:
|
|||
finger_id: int
|
||||
then:
|
||||
- fingerprint_grow.delete:
|
||||
finger_id: !lambda 'return finger_id;'
|
||||
finger_id: !lambda "return finger_id;"
|
||||
- service: fingerprint_grow_delete_all
|
||||
then:
|
||||
- fingerprint_grow.delete_all:
|
||||
|
||||
wifi:
|
||||
ssid: 'MySSID'
|
||||
password: 'password1'
|
||||
ssid: "MySSID"
|
||||
password: "password1"
|
||||
|
||||
i2c:
|
||||
sda: 4
|
||||
|
@ -317,7 +317,6 @@ wled:
|
|||
|
||||
adalight:
|
||||
|
||||
|
||||
sensor:
|
||||
- platform: daly_bms
|
||||
voltage:
|
||||
|
@ -416,7 +415,7 @@ sensor:
|
|||
send_every: 5
|
||||
send_first_at: 3
|
||||
quantile: .8
|
||||
- lambda: 'return 0;'
|
||||
- lambda: "return 0;"
|
||||
- delta: 100
|
||||
- throttle: 100ms
|
||||
- debounce: 500s
|
||||
|
@ -547,15 +546,15 @@ sensor:
|
|||
- platform: bl0942
|
||||
uart_id: uart3
|
||||
voltage:
|
||||
name: 'BL0942 Voltage'
|
||||
name: BL0942 Voltage
|
||||
current:
|
||||
name: 'BL0942 Current'
|
||||
name: BL0942 Current
|
||||
power:
|
||||
name: 'BL0942 Power'
|
||||
name: BL0942 Power
|
||||
energy:
|
||||
name: 'BL0942 Energy'
|
||||
name: BL0942 Energy
|
||||
frequency:
|
||||
name: "BL0942 Frequency"
|
||||
name: BL0942 Frequency
|
||||
- platform: pzem004t
|
||||
uart_id: uart3
|
||||
voltage:
|
||||
|
@ -847,7 +846,7 @@ binary_sensor:
|
|||
- invert
|
||||
- delayed_on: 20ms
|
||||
- delayed_off: 20ms
|
||||
- lambda: 'return false;'
|
||||
- lambda: "return false;"
|
||||
on_state:
|
||||
- logger.log: New state
|
||||
id: my_binary_sensor
|
||||
|
@ -1079,13 +1078,13 @@ interval:
|
|||
target: 500
|
||||
- stepper.set_target:
|
||||
id: my_stepper
|
||||
target: !lambda 'return 0;'
|
||||
target: !lambda "return 0;"
|
||||
- stepper.report_position:
|
||||
id: my_stepper2
|
||||
position: 0
|
||||
- stepper.report_position:
|
||||
id: my_stepper
|
||||
position: !lambda 'return 50/100.0;'
|
||||
position: !lambda "return 50/100.0;"
|
||||
|
||||
climate:
|
||||
- platform: bang_bang
|
||||
|
@ -1259,7 +1258,6 @@ sprinkler:
|
|||
run_duration: 10s
|
||||
valve_switch_id: gpio_switch2
|
||||
|
||||
|
||||
cover:
|
||||
- platform: endstop
|
||||
name: Endstop Cover
|
||||
|
@ -1281,13 +1279,13 @@ cover:
|
|||
frequency: 500.0Hz
|
||||
- output.esp8266_pwm.set_frequency:
|
||||
id: out
|
||||
frequency: !lambda 'return 500.0;'
|
||||
frequency: !lambda "return 500.0;"
|
||||
- servo.write:
|
||||
id: my_servo
|
||||
level: -100%
|
||||
- servo.write:
|
||||
id: my_servo
|
||||
level: !lambda 'return -1.0;'
|
||||
level: !lambda "return -1.0;"
|
||||
- delay: 2s
|
||||
- servo.detach: my_servo
|
||||
close_duration: 4.5min
|
||||
|
@ -1329,15 +1327,15 @@ cover:
|
|||
- logger.log: Malfunction Detected
|
||||
- platform: template
|
||||
name: Template Cover with Tilt
|
||||
tilt_lambda: 'return 0.5;'
|
||||
tilt_lambda: "return 0.5;"
|
||||
tilt_action:
|
||||
- output.set_level:
|
||||
id: out
|
||||
level: !lambda 'return tilt;'
|
||||
level: !lambda "return tilt;"
|
||||
position_action:
|
||||
- output.set_level:
|
||||
id: out
|
||||
level: !lambda 'return pos;'
|
||||
level: !lambda "return pos;"
|
||||
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
|
@ -1369,7 +1367,7 @@ output:
|
|||
then:
|
||||
- logger.log:
|
||||
format: "Changed state: %d"
|
||||
args: [ 'state' ]
|
||||
args: ["state"]
|
||||
- platform: custom
|
||||
type: float
|
||||
lambda: |-
|
||||
|
@ -1465,9 +1463,9 @@ sim800l:
|
|||
str = message;
|
||||
- sim800l.send_sms:
|
||||
message: hello you
|
||||
recipient: '+1234'
|
||||
recipient: "+1234"
|
||||
- sim800l.dial:
|
||||
recipient: '+1234'
|
||||
recipient: "+1234"
|
||||
|
||||
dfplayer:
|
||||
uart_id: uart5
|
||||
|
@ -1511,9 +1509,9 @@ rf_bridge:
|
|||
- rf_bridge.send_advanced_code:
|
||||
length: 0x04
|
||||
protocol: 0x01
|
||||
code: 'ABC123'
|
||||
code: "ABC123"
|
||||
- rf_bridge.send_raw:
|
||||
raw: 'AAA5070008001000ABC12355'
|
||||
raw: "AAA5070008001000ABC12355"
|
||||
- http_request.get:
|
||||
url: https://esphome.io
|
||||
headers:
|
||||
|
@ -1561,7 +1559,6 @@ display:
|
|||
then:
|
||||
lambda: 'ESP_LOGD("display","Display shows new page %u", x);'
|
||||
|
||||
|
||||
http_request:
|
||||
useragent: esphome/device
|
||||
timeout: 10s
|
||||
|
@ -1574,8 +1571,8 @@ fingerprint_grow:
|
|||
- homeassistant.event:
|
||||
event: esphome.${device_name}_fingerprint_grow_finger_scan_matched
|
||||
data:
|
||||
finger_id: !lambda 'return finger_id;'
|
||||
confidence: !lambda 'return confidence;'
|
||||
finger_id: !lambda "return finger_id;"
|
||||
confidence: !lambda "return confidence;"
|
||||
on_finger_scan_unmatched:
|
||||
- homeassistant.event:
|
||||
event: esphome.${device_name}_fingerprint_grow_finger_scan_unmatched
|
||||
|
@ -1583,18 +1580,18 @@ fingerprint_grow:
|
|||
- homeassistant.event:
|
||||
event: esphome.${device_name}_fingerprint_grow_enrollment_scan
|
||||
data:
|
||||
finger_id: !lambda 'return finger_id;'
|
||||
scan_num: !lambda 'return scan_num;'
|
||||
finger_id: !lambda "return finger_id;"
|
||||
scan_num: !lambda "return scan_num;"
|
||||
on_enrollment_done:
|
||||
- homeassistant.event:
|
||||
event: esphome.${device_name}_fingerprint_grow_node_enrollment_done
|
||||
data:
|
||||
finger_id: !lambda 'return finger_id;'
|
||||
finger_id: !lambda "return finger_id;"
|
||||
on_enrollment_failed:
|
||||
- homeassistant.event:
|
||||
event: esphome.${device_name}_fingerprint_grow_enrollment_failed
|
||||
data:
|
||||
finger_id: !lambda 'return finger_id;'
|
||||
finger_id: !lambda "return finger_id;"
|
||||
uart_id: uart6
|
||||
|
||||
dsmr:
|
||||
|
@ -1625,7 +1622,6 @@ button:
|
|||
- platform: factory_reset
|
||||
name: Restart Button (Factory Default Settings)
|
||||
|
||||
|
||||
cd74hc4067:
|
||||
pin_s0: GPIO12
|
||||
pin_s1: GPIO13
|
||||
|
|
|
@ -644,7 +644,6 @@ touchscreen:
|
|||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
||||
|
||||
|
||||
- platform: lilygo_t5_47
|
||||
id: lilygo_touchscreen
|
||||
interrupt_pin: GPIO36
|
||||
|
|
|
@ -374,7 +374,7 @@ select:
|
|||
|
||||
sensor:
|
||||
- platform: internal_temperature
|
||||
name: "Internal Temperature"
|
||||
name: Internal Temperature
|
||||
- platform: selec_meter
|
||||
total_active_energy:
|
||||
name: SelecEM2M Total Active Energy
|
||||
|
@ -614,7 +614,6 @@ sn74hc165:
|
|||
clock_inhibit_pin: GPIO26
|
||||
sr_count: 4
|
||||
|
||||
|
||||
matrix_keypad:
|
||||
id: keypad
|
||||
rows:
|
||||
|
@ -630,4 +629,3 @@ key_collector:
|
|||
source_id: keypad
|
||||
min_length: 4
|
||||
max_length: 4
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ rp2040:
|
|||
# Waiting for https://github.com/platformio/platform-raspberrypi/pull/36
|
||||
platform_version: https://github.com/maxgerhardt/platform-raspberrypi.git
|
||||
|
||||
|
||||
wifi:
|
||||
networks:
|
||||
- ssid: "MySSID"
|
||||
|
@ -40,4 +39,4 @@ switch:
|
|||
|
||||
sensor:
|
||||
- platform: internal_temperature
|
||||
name: "Internal Temperature"
|
||||
name: Internal Temperature
|
||||
|
|
|
@ -10,7 +10,7 @@ esp32:
|
|||
type: arduino
|
||||
|
||||
esphome:
|
||||
name: "esp32-s3-test"
|
||||
name: esp32-s3-test
|
||||
|
||||
logger:
|
||||
|
||||
|
@ -22,6 +22,6 @@ light:
|
|||
num_leds: 1
|
||||
id: neopixel
|
||||
method: esp32_rmt
|
||||
name: "neopixel-enable"
|
||||
name: neopixel-enable
|
||||
internal: false
|
||||
restore_mode: ALWAYS_OFF
|
||||
|
|
Loading…
Reference in a new issue