Hello,
I tried to use the wait_for_trigger to combine two automation into one.
I had one automation to turn on light when motion detected and another automation to turn off lights when no motion detected. They went well.
However, I tried to combine them into one automation and the new automation doesn’t work.
Here is my automation.
- id: '123456789'
alias: living room light
description: ''
trigger:
- device_id: 1234abcde
domain: binary_sensor
entity_id: binary_sensor.samsung_motion1_ias_zone
platform: device
type: motion
condition:
- condition: state
entity_id: input_boolean.living_light_off
state: 'off'
action:
- device_id: 456789
domain: switch
entity_id: switch.plug6
type: turn_on
- brightness_pct: 100
device_id: 789456
domain: light
entity_id: light.osram_lightify_a19_on_off_dim_e8c50c00_level_on_off
type: turn_on
- wait_for_trigger:
- type: no_motion
platform: device
device_id: 1234abcde
entity_id: binary_sensor.samsung_motion1_ias_zone
domain: binary_sensor
for:
hours: 0
minutes: 2
seconds: 0
timeout: ''
- type: turn_off
device_id: 456789
entity_id: switch.plug6
domain: switch
- type: turn_off
device_id: 789456
entity_id: light.osram_lightify_a19_on_off_dim_e8c50c00_level_on_off
domain: light
mode: single