I try to automate my Front door lights. But if I use automation with wait_for_trigger doesn’t work. If i use delay instead wait its working.
My config look like this:
alias: Swiatla porch
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.porch_swiatlo
from: "off"
to: "on"
condition:
- condition: sun
after: sunset
before: sunrise
action:
- service: switch.turn_on
data: {}
target:
entity_id: switch.porch_swiatla_switch
- wait_for_trigger:
- platform: state
entity_id:
- binary_sensor.front_door_motion
from: "on"
to: "off"
for:
hours: 0
minutes: 0
seconds: 0
timeout:
hours: 0
minutes: 0
seconds: 0
milliseconds: 0
enabled: true
- service: switch.turn_off
data: {}
enabled: true
target:
entity_id: switch.porch_swiatla_switch
mode: single
Its execute all automation without wait trigger.