1
0
mirror of https://github.com/esphome/esphome.git synced 2024-10-05 18:30:57 +01:00

Split test3.yaml (#4591)

This commit is contained in:
Jesse Hills 2023-03-20 11:39:02 +13:00 committed by GitHub
parent b2cec10601
commit 0b383542da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 627 additions and 526 deletions

View File

@ -41,6 +41,10 @@ jobs:
file: tests/test3.yaml
name: Test tests/test3.yaml
pio_cache_key: test3
- id: test
file: tests/test3.1.yaml
name: Test tests/test3.1.yaml
pio_cache_key: test3.1
- id: test
file: tests/test4.yaml
name: Test tests/test4.yaml

600
tests/test3.1.yaml Normal file
View File

@ -0,0 +1,600 @@
---
esphome:
name: $device_name
comment: $device_comment
build_path: build/test3.1
includes:
- custom.h
esp8266:
board: d1_mini
substitutions:
device_name: test3-1
device_comment: test3-1 device
min_sub: "0.03"
max_sub: "12.0%"
api:
wifi:
ssid: "MySSID"
password: "password1"
i2c:
sda: 4
scl: 5
scan: false
spi:
clk_pin: GPIO12
mosi_pin: GPIO13
miso_pin: GPIO14
ota:
logger:
sensor:
- platform: apds9960
type: proximity
name: APDS9960 Proximity
- platform: vl53l0x
name: VL53L0x Distance
address: 0x29
update_interval: 60s
enable_pin: GPIO13
timeout: 200us
- platform: apds9960
type: clear
name: APDS9960 Clear
- platform: apds9960
type: red
name: APDS9960 Red
- platform: apds9960
type: green
name: APDS9960 Green
- platform: apds9960
type: blue
name: APDS9960 Blue
- platform: aht10
temperature:
name: Temperature
humidity:
name: Humidity
- platform: am2320
temperature:
name: Temperature
humidity:
name: Humidity
- platform: adc
pin: VCC
id: my_sensor
filters:
- offset: 5.0
- multiply: 2.0
- filter_out: NAN
- sliding_window_moving_average:
- exponential_moving_average:
- quantile:
window_size: 5
send_every: 5
send_first_at: 3
quantile: .8
- lambda: "return 0;"
- delta: 100
- throttle: 100ms
- debounce: 500s
- calibrate_linear:
- 0 -> 0
- 100 -> 100
- calibrate_polynomial:
degree: 3
datapoints:
- 0 -> 0
- 100 -> 200
- 400 -> 500
- -50 -> -1000
- -100 -> -10000
- platform: cd74hc4067
id: cd74hc4067_0
number: 0
sensor: my_sensor
- platform: resistance
sensor: my_sensor
configuration: DOWNSTREAM
resistor: 10kΩ
reference_voltage: 3.3V
name: Resistance
id: resist
- platform: ntc
sensor: resist
name: NTC Sensor
calibration:
b_constant: 3950
reference_resistance: 10k
reference_temperature: 25°C
- platform: ntc
sensor: resist
name: NTC Sensor2
calibration:
- 10.0kOhm -> 25°C
- 27.219kOhm -> 0°C
- 14.674kOhm -> 15°C
- platform: ct_clamp
sensor: my_sensor
name: CT Clamp
sample_duration: 500ms
update_interval: 5s
- platform: tcs34725
red_channel:
name: Red Channel
green_channel:
name: Green Channel
blue_channel:
name: Blue Channel
clear_channel:
name: Clear Channel
illuminance:
name: Illuminance
color_temperature:
name: Color Temperature
integration_time: 614ms
gain: 60x
- platform: custom
lambda: |-
auto s = new CustomSensor();
App.register_component(s);
return {s};
sensors:
- id: custom_sensor
name: Custom Sensor
- platform: ade7953
irq_pin: GPIO16
voltage:
name: ADE7953 Voltage
id: ade7953_voltage
current_a:
name: ADE7953 Current A
id: ade7953_current_a
current_b:
name: ADE7953 Current B
id: ade7953_current_b
active_power_a:
name: ADE7953 Active Power A
id: ade7953_active_power_a
active_power_b:
name: ADE7953 Active Power B
id: ade7953_active_power_b
- platform: tmp102
name: TMP102 Temperature
- platform: hm3301
pm_1_0:
name: PM1.0
pm_2_5:
name: PM2.5
pm_10_0:
name: PM10.0
aqi:
name: AQI
calculation_type: AQI
- platform: ezo
id: ph_ezo
address: 99
unit_of_measurement: pH
- platform: tof10120
name: Distance sensor
update_interval: 5s
- platform: mlx90393
oversampling: 1
filter: 0
gain: 3X
x_axis:
name: mlxxaxis
y_axis:
name: mlxyaxis
z_axis:
name: mlxzaxis
resolution: 17BIT
temperature:
name: mlxtemp
oversampling: 2
- platform: adc128s102
id: adc128s102_channel_0
channel: 0
apds9960:
address: 0x20
update_interval: 60s
mpr121:
id: mpr121_first
address: 0x5A
binary_sensor:
- platform: apds9960
direction: up
name: APDS9960 Up
device_class: motion
filters:
- invert
- delayed_on: 20ms
- delayed_off: 20ms
- lambda: "return false;"
on_state:
- logger.log: New state
id: my_binary_sensor
- platform: apds9960
direction: down
name: APDS9960 Down
- platform: apds9960
direction: left
name: APDS9960 Left
- platform: apds9960
direction: right
name: APDS9960 Right
- platform: mpr121
id: touchkey0
channel: 0
name: touchkey0
- platform: mpr121
channel: 1
name: touchkey1
id: bin1
- platform: mpr121
channel: 2
name: touchkey2
id: bin2
- platform: mpr121
channel: 3
name: touchkey3
id: bin3
on_press:
then:
- switch.toggle: mpr121_toggle
- platform: ttp229_lsf
channel: 1
name: TTP229 LSF Test
- platform: ttp229_bsf
channel: 1
name: TTP229 BSF Test
- platform: custom
lambda: |-
auto s = new CustomBinarySensor();
App.register_component(s);
return {s};
binary_sensors:
- id: custom_binary_sensor
name: Custom Binary Sensor
- platform: template
id: cover_toggle
on_press:
then:
- cover.toggle: time_based_cover
- cover.toggle: endstop_cover
- cover.toggle: current_based_cover
globals:
- id: my_global_string
type: std::string
initial_value: '""'
text_sensor:
- platform: custom
lambda: |-
auto s = new CustomTextSensor();
App.register_component(s);
return {s};
text_sensors:
- id: custom_text_sensor
name: Custom Text Sensor
sm2135:
data_pin: GPIO12
clock_pin: GPIO14
switch:
- platform: template
name: mpr121_toggle
id: mpr121_toggle
optimistic: true
- platform: gpio
id: gpio_switch1
pin:
mcp23xxx: mcp23017_hub
number: 0
mode: OUTPUT
interlock: &interlock [gpio_switch1, gpio_switch2, gpio_switch3]
- platform: gpio
id: gpio_switch2
pin:
mcp23xxx: mcp23008_hub
number: 0
mode: OUTPUT
interlock: *interlock
- platform: gpio
id: gpio_switch3
pin: GPIO1
interlock: *interlock
- platform: custom
lambda: |-
auto s = new CustomSwitch();
return {s};
switches:
- id: custom_switch
name: Custom Switch
on_turn_on:
- http_request.get:
url: https://esphome.io
headers:
Content-Type: application/json
verify_ssl: false
- http_request.post:
url: https://esphome.io
verify_ssl: false
json:
key: !lambda |-
return id(custom_text_sensor).state;
greeting: Hello World
- http_request.send:
method: PUT
url: https://esphome.io
headers:
Content-Type: application/json
body: Some data
verify_ssl: false
custom_component:
lambda: |-
auto s = new CustomComponent();
s->set_update_interval(15000);
return {s};
stepper:
- platform: uln2003
id: my_stepper
pin_a: GPIO12
pin_b: GPIO13
pin_c: GPIO14
pin_d: GPIO15
sleep_when_done: false
step_mode: HALF_STEP
max_speed: 250 steps/s
acceleration: inf
deceleration: inf
- platform: a4988
id: my_stepper2
step_pin: GPIO1
dir_pin: GPIO2
max_speed: 0.1 steps/s
acceleration: 10 steps/s^2
deceleration: 10 steps/s^2
interval:
interval: 5s
then:
- logger.log: Interval Run
- stepper.set_target:
id: my_stepper2
target: 500
- stepper.set_target:
id: my_stepper
target: !lambda "return 0;"
- stepper.report_position:
id: my_stepper2
position: 0
- stepper.report_position:
id: my_stepper
position: !lambda "return 50/100.0;"
cover:
- platform: endstop
name: Endstop Cover
id: endstop_cover
stop_action:
- switch.turn_on: gpio_switch1
open_endstop: my_binary_sensor
open_action:
- switch.turn_on: gpio_switch1
open_duration: 5min
close_endstop: my_binary_sensor
close_action:
- switch.turn_on: gpio_switch2
- output.set_level:
id: out
level: 50%
- output.esp8266_pwm.set_frequency:
id: out
frequency: 500.0Hz
- output.esp8266_pwm.set_frequency:
id: out
frequency: !lambda "return 500.0;"
- servo.write:
id: my_servo
level: -100%
- servo.write:
id: my_servo
level: !lambda "return -1.0;"
- delay: 2s
- servo.detach: my_servo
close_duration: 4.5min
max_duration: 10min
- platform: time_based
name: Time Based Cover
id: time_based_cover
stop_action:
- switch.turn_on: gpio_switch1
open_action:
- switch.turn_on: gpio_switch1
open_duration: 5min
close_action:
- switch.turn_on: gpio_switch2
close_duration: 4.5min
- platform: current_based
name: Current Based Cover
id: current_based_cover
open_sensor: ade7953_current_a
open_moving_current_threshold: 0.5
open_obstacle_current_threshold: 0.8
open_duration: 12s
open_action:
- switch.turn_on: gpio_switch1
close_sensor: ade7953_current_b
close_moving_current_threshold: 0.5
close_obstacle_current_threshold: 0.8
close_duration: 10s
close_action:
- switch.turn_on: gpio_switch2
stop_action:
- switch.turn_off: gpio_switch1
- switch.turn_off: gpio_switch2
obstacle_rollback: 30%
start_sensing_delay: 0.8s
malfunction_detection: true
malfunction_action:
then:
- logger.log: Malfunction Detected
- platform: template
name: Template Cover with Tilt
tilt_lambda: "return 0.5;"
tilt_action:
- output.set_level:
id: out
level: !lambda "return tilt;"
position_action:
- output.set_level:
id: out
level: !lambda "return pos;"
output:
- platform: esp8266_pwm
id: out
pin: D3
frequency: 50Hz
- platform: esp8266_pwm
id: out2
pin: D4
- platform: custom
type: binary
lambda: |-
auto s = new CustomBinaryOutput();
App.register_component(s);
return {s};
outputs:
- id: custom_binary
- platform: sigma_delta_output
id: sddac
update_interval: 60s
pin: D4
turn_on_action:
then:
- logger.log: "Turned on"
turn_off_action:
then:
- logger.log: "Turned off"
state_change_action:
then:
- logger.log:
format: "Changed state: %d"
args: ["state"]
- platform: custom
type: float
lambda: |-
auto s = new CustomFloatOutput();
App.register_component(s);
return {s};
outputs:
- id: custom_float
- platform: slow_pwm
pin: GPIO5
id: my_slow_pwm
period: 15s
restart_cycle_on_state_change: false
- platform: sm2135
id: sm2135_0
channel: 0
- platform: sm2135
id: sm2135_1
channel: 1
- platform: sm2135
id: sm2135_2
channel: 2
- platform: sm2135
id: sm2135_3
channel: 3
- platform: sm2135
id: sm2135_4
channel: 4
mcp23017:
id: mcp23017_hub
mcp23008:
id: mcp23008_hub
light:
- platform: hbridge
name: Icicle Lights
pin_a: out
pin_b: out2
servo:
id: my_servo
output: out
restore: true
min_level: $min_sub
max_level: $max_sub
ttp229_lsf:
ttp229_bsf:
sdo_pin: D2
scl_pin: D1
display:
- platform: max7219digit
cs_pin: GPIO15
num_chips: 4
rotate_chip: 0
intensity: 10
scroll_mode: STOP
id: my_matrix
lambda: |-
it.printdigit("hello");
http_request:
useragent: esphome/device
timeout: 10s
button:
- platform: output
id: output_button
output: out
duration: 100ms
- platform: wake_on_lan
target_mac_address: 12:34:56:78:90:ab
name: wol_test_1
id: wol_1
- platform: factory_reset
name: Restart Button (Factory Default Settings)
cd74hc4067:
pin_s0: GPIO12
pin_s1: GPIO13
pin_s2: GPIO14
pin_s3: GPIO15
adc128s102:
cs_pin: GPIO12

View File

@ -3,8 +3,6 @@ esphome:
name: $device_name
comment: $device_comment
build_path: build/test3
platformio_options:
board_build.partitions: huge_app.csv
on_boot:
- if:
condition:
@ -13,8 +11,6 @@ esphome:
- time.has_time
then:
- logger.log: Have time
includes:
- custom.h
esp8266:
board: d1_mini
@ -23,8 +19,6 @@ esp8266:
substitutions:
device_name: test3
device_comment: test3 device
min_sub: "0.03"
max_sub: "12.0%"
api:
port: 8000
@ -52,9 +46,6 @@ api:
string_: string
then:
- logger.log: Something happened
- stepper.set_target:
id: my_stepper2
target: !lambda "return int_;"
- service: array_types
variables:
bool_arr: bool[]
@ -224,16 +215,6 @@ wifi:
ssid: "MySSID"
password: "password1"
i2c:
sda: 4
scl: 5
scan: false
spi:
clk_pin: GPIO12
mosi_pin: GPIO13
miso_pin: GPIO14
uart:
- id: uart1
tx_pin:
@ -349,40 +330,11 @@ sensor:
name: Temperature 1
temperature_2:
name: Temperature 2
- platform: apds9960
type: proximity
name: APDS9960 Proximity
- platform: vl53l0x
name: VL53L0x Distance
address: 0x29
update_interval: 60s
enable_pin: GPIO13
timeout: 200us
- platform: apds9960
type: clear
name: APDS9960 Clear
- platform: apds9960
type: red
name: APDS9960 Red
- platform: apds9960
type: green
name: APDS9960 Green
- platform: apds9960
type: blue
name: APDS9960 Blue
- platform: homeassistant
entity_id: sensor.hello_world
id: ha_hello_world
- platform: aht10
temperature:
name: Temperature
humidity:
name: Humidity
- platform: am2320
temperature:
name: Temperature
humidity:
name: Humidity
- platform: hydreon_rgxx
model: RG 9
uart_id: uart6
@ -404,86 +356,7 @@ sensor:
- platform: adc
pin: VCC
id: my_sensor
filters:
- offset: 5.0
- multiply: 2.0
- filter_out: NAN
- sliding_window_moving_average:
- exponential_moving_average:
- quantile:
window_size: 5
send_every: 5
send_first_at: 3
quantile: .8
- lambda: "return 0;"
- delta: 100
- throttle: 100ms
- debounce: 500s
- calibrate_linear:
- 0 -> 0
- 100 -> 100
- calibrate_polynomial:
degree: 3
datapoints:
- 0 -> 0
- 100 -> 200
- 400 -> 500
- -50 -> -1000
- -100 -> -10000
- platform: cd74hc4067
id: cd74hc4067_0
number: 0
sensor: my_sensor
- platform: resistance
sensor: my_sensor
configuration: DOWNSTREAM
resistor: 10kΩ
reference_voltage: 3.3V
name: Resistance
id: resist
- platform: ntc
sensor: resist
name: NTC Sensor
calibration:
b_constant: 3950
reference_resistance: 10k
reference_temperature: 25°C
- platform: ntc
sensor: resist
name: NTC Sensor2
calibration:
- 10.0kOhm -> 25°C
- 27.219kOhm -> 0°C
- 14.674kOhm -> 15°C
- platform: ct_clamp
sensor: my_sensor
name: CT Clamp
sample_duration: 500ms
update_interval: 5s
- platform: tcs34725
red_channel:
name: Red Channel
green_channel:
name: Green Channel
blue_channel:
name: Blue Channel
clear_channel:
name: Clear Channel
illuminance:
name: Illuminance
color_temperature:
name: Color Temperature
integration_time: 614ms
gain: 60x
- platform: custom
lambda: |-
auto s = new CustomSensor();
App.register_component(s);
return {s};
sensors:
- id: custom_sensor
name: Custom Sensor
- platform: binary_sensor_map
name: Binary Sensor Map
type: group
@ -494,23 +367,7 @@ sensor:
value: 15.0
- binary_sensor: bin3
value: 100.0
- platform: ade7953
irq_pin: GPIO16
voltage:
name: ADE7953 Voltage
id: ade7953_voltage
current_a:
name: ADE7953 Current A
id: ade7953_current_a
current_b:
name: ADE7953 Current B
id: ade7953_current_b
active_power_a:
name: ADE7953 Active Power A
id: ade7953_active_power_a
active_power_b:
name: ADE7953 Active Power B
id: ade7953_active_power_b
- platform: bl0939
uart_id: uart8
voltage:
@ -587,18 +444,7 @@ sensor:
name: PZEMDC Power
energy:
name: PZEMDC Energy
- platform: tmp102
name: TMP102 Temperature
- platform: hm3301
pm_1_0:
name: PM1.0
pm_2_5:
name: PM2.5
pm_10_0:
name: PM10.0
aqi:
name: AQI
calculation_type: AQI
- platform: pmsx003
uart_id: uart9
type: PMSX003
@ -707,13 +553,7 @@ sensor:
name: CSE7766 Current
power:
name: CSE776 Power
- platform: ezo
id: ph_ezo
address: 99
unit_of_measurement: pH
- platform: tof10120
name: Distance sensor
update_interval: 5s
- platform: fingerprint_grow
fingerprint_count:
name: Fingerprint Count
@ -796,20 +636,6 @@ sensor:
name: testwave
component_id: 2
wave_channel_id: 1
- platform: mlx90393
oversampling: 1
filter: 0
gain: 3X
x_axis:
name: mlxxaxis
y_axis:
name: mlxyaxis
z_axis:
name: mlxzaxis
resolution: 17BIT
temperature:
name: mlxtemp
oversampling: 2
- platform: smt100
uart_id: uart10
counts:
@ -824,10 +650,6 @@ sensor:
name: Voltage
update_interval: 60s
- platform: adc128s102
id: adc128s102_channel_0
channel: 0
- platform: vbus
model: deltasol c
temperature_1:
@ -842,79 +664,19 @@ sensor:
time:
- platform: homeassistant
apds9960:
address: 0x20
update_interval: 60s
mpr121:
id: mpr121_first
address: 0x5A
binary_sensor:
- platform: daly_bms
charging_mos_enabled:
name: Charging MOS
discharging_mos_enabled:
name: Discharging MOS
- platform: apds9960
direction: up
name: APDS9960 Up
device_class: motion
filters:
- invert
- delayed_on: 20ms
- delayed_off: 20ms
- lambda: "return false;"
on_state:
- logger.log: New state
id: my_binary_sensor
- platform: apds9960
direction: down
name: APDS9960 Down
- platform: apds9960
direction: left
name: APDS9960 Left
- platform: apds9960
direction: right
name: APDS9960 Right
- platform: homeassistant
entity_id: binary_sensor.hello_world
id: ha_hello_world_binary
- platform: mpr121
id: touchkey0
channel: 0
name: touchkey0
- platform: mpr121
channel: 1
name: touchkey1
id: bin1
- platform: mpr121
channel: 2
name: touchkey2
id: bin2
- platform: mpr121
channel: 3
name: touchkey3
id: bin3
on_press:
then:
- switch.toggle: mpr121_toggle
- platform: ttp229_lsf
channel: 1
name: TTP229 LSF Test
- platform: ttp229_bsf
channel: 1
name: TTP229 BSF Test
- platform: fingerprint_grow
name: Fingerprint Enrolling
- platform: custom
lambda: |-
auto s = new CustomBinarySensor();
App.register_component(s);
return {s};
binary_sensors:
- id: custom_binary_sensor
name: Custom Binary Sensor
- platform: nextion
page_id: 0
component_id: 2
@ -923,13 +685,7 @@ binary_sensor:
id: r0_sensor
name: R0 Sensor
component_name: page0.r0
- platform: template
id: cover_toggle
on_press:
then:
- cover.toggle: time_based_cover
- cover.toggle: endstop_cover
- cover.toggle: current_based_cover
- platform: hydreon_rgxx
hydreon_rgxx_id: hydreon_rg9
too_cold:
@ -954,6 +710,16 @@ binary_sensor:
relay1:
name: Relay 1 On
- platform: gpio
id: bin1
pin: 1
- platform: gpio
id: bin2
pin: 2
- platform: gpio
id: bin3
pin: 3
globals:
- id: my_global_string
type: std::string
@ -998,14 +764,6 @@ text_sensor:
- platform: homeassistant
entity_id: sensor.hello_world2
id: ha_hello_world2
- platform: custom
lambda: |-
auto s = new CustomTextSensor();
App.register_component(s);
return {s};
text_sensors:
- id: custom_text_sensor
name: Custom Text Sensor
- platform: nextion
name: text0
id: text0
@ -1022,87 +780,22 @@ script:
then:
- lambda: 'ESP_LOGD("main", "Hello World!");'
sm2135:
data_pin: GPIO12
clock_pin: GPIO14
switch:
- platform: template
name: mpr121_toggle
id: mpr121_toggle
optimistic: true
- platform: gpio
id: gpio_switch1
pin:
mcp23xxx: mcp23017_hub
number: 0
mode: OUTPUT
interlock: &interlock [gpio_switch1, gpio_switch2, gpio_switch3]
pin: 1
- platform: gpio
id: gpio_switch2
pin:
mcp23xxx: mcp23008_hub
number: 0
mode: OUTPUT
interlock: *interlock
pin: 2
- platform: gpio
id: gpio_switch3
pin: GPIO1
interlock: *interlock
- platform: custom
lambda: |-
auto s = new CustomSwitch();
return {s};
switches:
- id: custom_switch
name: Custom Switch
pin: 3
- platform: nextion
id: r0
name: R0 Switch
component_name: page0.r0
custom_component:
lambda: |-
auto s = new CustomComponent();
s->set_update_interval(15000);
return {s};
stepper:
- platform: uln2003
id: my_stepper
pin_a: GPIO12
pin_b: GPIO13
pin_c: GPIO14
pin_d: GPIO15
sleep_when_done: false
step_mode: HALF_STEP
max_speed: 250 steps/s
acceleration: inf
deceleration: inf
- platform: a4988
id: my_stepper2
step_pin: GPIO1
dir_pin: GPIO2
max_speed: 0.1 steps/s
acceleration: 10 steps/s^2
deceleration: 10 steps/s^2
interval:
interval: 5s
then:
- logger.log: Interval Run
- stepper.set_target:
id: my_stepper2
target: 500
- stepper.set_target:
id: my_stepper
target: !lambda "return 0;"
- stepper.report_position:
id: my_stepper2
position: 0
- stepper.report_position:
id: my_stepper
position: !lambda "return 50/100.0;"
climate:
- platform: bang_bang
@ -1276,85 +969,6 @@ sprinkler:
run_duration: 10s
valve_switch_id: gpio_switch2
cover:
- platform: endstop
name: Endstop Cover
id: endstop_cover
stop_action:
- switch.turn_on: gpio_switch1
open_endstop: my_binary_sensor
open_action:
- switch.turn_on: gpio_switch1
open_duration: 5min
close_endstop: my_binary_sensor
close_action:
- switch.turn_on: gpio_switch2
- output.set_level:
id: out
level: 50%
- output.esp8266_pwm.set_frequency:
id: out
frequency: 500.0Hz
- output.esp8266_pwm.set_frequency:
id: out
frequency: !lambda "return 500.0;"
- servo.write:
id: my_servo
level: -100%
- servo.write:
id: my_servo
level: !lambda "return -1.0;"
- delay: 2s
- servo.detach: my_servo
close_duration: 4.5min
max_duration: 10min
- platform: time_based
name: Time Based Cover
id: time_based_cover
stop_action:
- switch.turn_on: gpio_switch1
open_action:
- switch.turn_on: gpio_switch1
open_duration: 5min
close_action:
- switch.turn_on: gpio_switch2
close_duration: 4.5min
- platform: current_based
name: Current Based Cover
id: current_based_cover
open_sensor: ade7953_current_a
open_moving_current_threshold: 0.5
open_obstacle_current_threshold: 0.8
open_duration: 12s
open_action:
- switch.turn_on: gpio_switch1
close_sensor: ade7953_current_b
close_moving_current_threshold: 0.5
close_obstacle_current_threshold: 0.8
close_duration: 10s
close_action:
- switch.turn_on: gpio_switch2
stop_action:
- switch.turn_off: gpio_switch1
- switch.turn_off: gpio_switch2
obstacle_rollback: 30%
start_sensing_delay: 0.8s
malfunction_detection: true
malfunction_action:
then:
- logger.log: Malfunction Detected
- platform: template
name: Template Cover with Tilt
tilt_lambda: "return 0.5;"
tilt_action:
- output.set_level:
id: out
level: !lambda "return tilt;"
position_action:
- output.set_level:
id: out
level: !lambda "return pos;"
output:
- platform: esp8266_pwm
id: out
@ -1363,63 +977,11 @@ output:
- platform: esp8266_pwm
id: out2
pin: D4
- platform: custom
type: binary
lambda: |-
auto s = new CustomBinaryOutput();
App.register_component(s);
return {s};
outputs:
- id: custom_binary
- platform: sigma_delta_output
id: sddac
update_interval: 60s
pin: D4
turn_on_action:
then:
- logger.log: "Turned on"
turn_off_action:
then:
- logger.log: "Turned off"
state_change_action:
then:
- logger.log:
format: "Changed state: %d"
args: ["state"]
- platform: custom
type: float
lambda: |-
auto s = new CustomFloatOutput();
App.register_component(s);
return {s};
outputs:
- id: custom_float
- platform: slow_pwm
pin: GPIO5
id: my_slow_pwm
period: 15s
restart_cycle_on_state_change: false
- platform: sm2135
id: sm2135_0
channel: 0
- platform: sm2135
id: sm2135_1
channel: 1
- platform: sm2135
id: sm2135_2
channel: 2
- platform: sm2135
id: sm2135_3
channel: 3
- platform: sm2135
id: sm2135_4
channel: 4
mcp23017:
id: mcp23017_hub
mcp23008:
id: mcp23008_hub
e131:
@ -1459,19 +1021,6 @@ light:
firmware: "51.6"
uart_id: uart11
servo:
id: my_servo
output: out
restore: true
min_level: $min_sub
max_level: $max_sub
ttp229_lsf:
ttp229_bsf:
sdo_pin: D2
scl_pin: D1
sim800l:
uart_id: uart4
on_sms_received:
@ -1530,36 +1079,9 @@ rf_bridge:
code: "ABC123"
- rf_bridge.send_raw:
raw: "AAA5070008001000ABC12355"
- http_request.get:
url: https://esphome.io
headers:
Content-Type: application/json
verify_ssl: false
- http_request.post:
url: https://esphome.io
verify_ssl: false
json:
key: !lambda |-
return id(version_sensor).state;
greeting: Hello World
- http_request.send:
method: PUT
url: https://esphome.io
headers:
Content-Type: application/json
body: Some data
verify_ssl: false
display:
- platform: max7219digit
cs_pin: GPIO15
num_chips: 4
rotate_chip: 0
intensity: 10
scroll_mode: STOP
id: my_matrix
lambda: |-
it.printdigit("hello");
- platform: nextion
uart_id: uart1
tft_url: http://esphome.io/default35.tft
@ -1577,10 +1099,6 @@ display:
then:
lambda: 'ESP_LOGD("display","Display shows new page %u", x);'
http_request:
useragent: esphome/device
timeout: 10s
fingerprint_grow:
sensing_pin: 4
password: 0x12FE37DC
@ -1627,24 +1145,3 @@ daly_bms:
qr_code:
- id: homepage_qr
value: https://esphome.io/index.html
button:
- platform: output
id: output_button
output: out
duration: 100ms
- platform: wake_on_lan
target_mac_address: 12:34:56:78:90:ab
name: wol_test_1
id: wol_1
- platform: factory_reset
name: Restart Button (Factory Default Settings)
cd74hc4067:
pin_s0: GPIO12
pin_s1: GPIO13
pin_s2: GPIO14
pin_s3: GPIO15
adc128s102:
cs_pin: GPIO12