请问在ESPHOME自动化里判断开关的状态中间如何加个等待时间?
自动化里符合两个条件再执行。怎样在两个条件中间加个等待时间代码?图片所示
switch:
- platform: gpio
name: "房灯"
id: led222
pin: GPIO2
inverted: true
on_turn_on:
if:
condition:
and:
- switch.is_on: led666
- switch.is_on: led333
then:
- switch.turn_on: fan888
- platform: gpio
name: "风扇灯"
id: fan888
pin: GPIO12
inverted: true
- platform: gpio
name: "玻璃灯"
id: led333
pin: GPIO12
inverted: true
- platform: gpio
name: "吊灯"
id: led666
pin: GPIO12
inverted: true
|