1
0
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:
Jesse Hills
2021-10-13 08:23:24 +13:00
committed by GitHub
parent 1184bbc976
commit 34db9d9ef2
4 changed files with 30 additions and 6 deletions

View File

@@ -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);

View File

@@ -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