mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 14:43:51 +00:00
Add optional timeout for wait_until action (#2282)
This commit is contained in:
@@ -364,8 +364,11 @@ sensor:
|
||||
then:
|
||||
- lambda: >-
|
||||
ESP_LOGD("main", "Got value range %f", x);
|
||||
- wait_until: wifi.connected
|
||||
- wait_until:
|
||||
binary_sensor.is_on: binary_sensor1
|
||||
condition:
|
||||
binary_sensor.is_on: binary_sensor1
|
||||
timeout: 1s
|
||||
on_raw_value:
|
||||
- lambda: >-
|
||||
ESP_LOGD("main", "Got raw value %f", x);
|
||||
|
||||
@@ -5,10 +5,13 @@ esphome:
|
||||
board: d1_mini
|
||||
build_path: build/test3
|
||||
on_boot:
|
||||
- wait_until:
|
||||
- api.connected
|
||||
- wifi.connected
|
||||
- time.has_time
|
||||
- if:
|
||||
condition:
|
||||
- api.connected
|
||||
- wifi.connected
|
||||
- time.has_time
|
||||
then:
|
||||
- logger.log: "Have time"
|
||||
includes:
|
||||
- custom.h
|
||||
|
||||
@@ -1291,4 +1294,3 @@ dsmr:
|
||||
daly_bms:
|
||||
update_interval: 20s
|
||||
uart_id: uart1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user