ello everyone
i have an automation for my stair lighting based on my motion detectors.
However, I have a problem with this, namely the light on stairs 1 / 2 does not go out again if, for example, only BM1 is activated and BM2 is not.
it stops every time at the timeout of 1 minute, so I would have to set a condition beforehand and see if BM1 / BM2 have no more movement and then switch off the stairs again.
I tried to write the shutdown at the end of the automation but that never works because the timeout above then stops directly.
(pl_wipe_up = 1st stair on)
(pl_wipe_down = 1st stair off)
(pl_stair2_wipe_up = 2nd stair on)
(pl_stair2_wipe_down = 2nd stair off)
Maybe someone can help me there?
and my automation:
alias: >-
Treppenbeleuchtung - Wipe Effekt ################# WIP
##################
description: ''
trigger:
- type: motion
platform: device
device_id: 0d55531630d0956068cbe251d38cf540
entity_id: binary_sensor.hue_motion_sensor_1_motion
domain: binary_sensor
id: BM1
- type: motion
platform: device
device_id: af7049057675aaad0ce981dc433064b5
entity_id: binary_sensor.hue_motion_sensor_2_motion
domain: binary_sensor
id: BM2
- type: motion
platform: device
device_id: e2a31164d58c1f6b1c20de882398aa2d
entity_id: binary_sensor.motion_sensor
domain: binary_sensor
id: BM3
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: BM1
sequence:
- service: select.select_option
target:
entity_id: select.wled_playlist
data:
option: pl_wipe_up
- wait_for_trigger:
- platform: state
entity_id:
- binary_sensor.motion_sensor
from: 'off'
to: 'on'
timeout: '00:01:00'
continue_on_timeout: false
- service: select.select_option
target:
entity_id: select.wled_stair2_playlist
data:
option: pl_stair2_wipe_up
- service: select.select_option
target:
entity_id: select.wled_playlist
data:
option: pl_wipe_down
- wait_for_trigger:
- platform: state
entity_id:
- binary_sensor.hue_motion_sensor_2_motion
from: 'off'
to: 'on'
timeout: '00:01:00'
continue_on_timeout: false
- service: select.select_option
target:
entity_id: select.wled_stair2_playlist
data:
option: pl_stair2_wipe_down
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- conditions:
- condition: trigger
id: BM3
sequence:
- service: select.select_option
target:
entity_id: select.wled_stair2_playlist
data:
option: pl_stair2_wipe_up
- wait_for_trigger:
- platform: state
entity_id:
- binary_sensor.motion_sensor
from: 'off'
to: 'on'
timeout: '00:01:00'
continue_on_timeout: false
- service: select.select_option
target:
entity_id: select.wled_playlist
data:
option: pl_wipe_up
- service: select.select_option
target:
entity_id: select.wled_stair2_playlist
data:
option: pl_stair2_wipe_down
- wait_for_trigger:
- platform: state
entity_id:
- binary_sensor.hue_motion_sensor_1_motion
from: 'off'
to: 'on'
timeout: '00:01:00'
continue_on_timeout: false
- service: select.select_option
target:
entity_id: select.wled_playlist
data:
option: pl_wipe_down
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
default: []
- service: select.select_option
target:
entity_id: select.wled_playlist
data:
option: pl_wipe_down
- service: select.select_option
target:
entity_id: select.wled_stair2_playlist
data:
option: pl_stair2_wipe_down
mode: single