My automation : if no motion, for 2 minutes, turn off lights.
I want to replace the hours,minutes… by helper “input_datetime.wachtijd” (time only)
so the “for:” part, needs to be variable, so its easier to change the time…
but… I can’t find a solution. I’ve found 'kind of this problem" solutions here, but they don’t seem to work for me… I get an error when I try to save it.
(the “choose” keyword I use in the action part is for extending the automation further in the future)
alias: Toilet Motion STOP
description: ''
trigger:
- type: no_motion
platform: device
device_id: 38e9d1ee8481b1c83606adb39643af63
entity_id: binary_sensor.toiler_hue_motion_sensor_1
domain: binary_sensor
for:
hours: 0
minutes: 2
seconds: 0
milliseconds: 0
condition: []
action:
- choose: []
default:
- service: light.turn_off
data: {}
entity_id: light.toilet_hue_lamp_1
mode: single