Hello
Am trying to use a Motion sensor with a MQTT payload to to turn a light on and off
The payloads are open / closed
Open turn = on and closed = off
All is working however, I want to wait for 30 seconds of constant closed being Detected before turning the light off, as if you stop moving for a second currently the lights go off then back on
I have the below however clearly missing something or doing something wrong, any thoughts or suggestions would be appreciated.
alias: Kitchen LED on With PIR
description: ""
trigger:
- platform: mqtt
topic: Pir/kitchen/prio/inputs/read/1004
payload: OPEN
condition:
- condition: sun
before: sunrise
after: sunset
action:
- action: light.turn_on
metadata: {}
data:
rgb_color:
- 255
- 255
- 255
brightness_pct: 50
target:
entity_id: light.kitchen_led
device_id: 2db98dc8a48ca34413b9f00ab5a76ae6
- wait_for_trigger:
- platform: mqtt
topic: Pir/kitchen/prio/inputs/read/1004
payload: CLOSED
timeout:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
continue_on_timeout: false
- action: light.turn_off
metadata: {}
data: {}
target:
device_id: 2db98dc8a48ca34413b9f00ab5a76ae6
mode: single
Thank you