Hi, I created an automation to turn on some lights when my motion detector sences someone is in the room or it gets dark enough and then to turn off if the brightness is above a certan lever or nobody is detected for 30 min. With how I have it not, the light will turn on fine but it never turns off. I don't know why this is nor how to fix it. I have been messing with this for the past week with no luck.
description: ""
triggers:
- trigger: state
entity_id:
- binary_sensor.lnlinkha_e04b41018010000000000000deac0000
to:
- "on"
from:
- "off"
- trigger: numeric_state
entity_id:
- sensor.lnlinkha_e04b41018010000000000000deac0000_l
below: 2
for:
hours: 0
minutes: 0
seconds: 10
conditions:
- condition: time
after: "04:15:00"
before: "23:30:00"
- condition: numeric_state
entity_id: number.lnlinkha_e04b41018010000000000000deac0000_config_l
below: 2
- condition: state
entity_id: binary_sensor.lnlinkha_e04b41018010000000000000deac0000
state:
- "on"
actions:
- action: light.turn_on
metadata: {}
target:
entity_id: light.kitchen_accent_lights
data: {}
- wait_for_trigger:
- trigger: state
entity_id:
- binary_sensor.lnlinkha_e04b41018010000000000000deac0000
for:
hours: 0
minutes: 30
seconds: 0
to:
- "off"
- trigger: numeric_state
entity_id:
- number.lnlinkha_e04b41018010000000000000deac0000_config_l
above: 2
- action: light.turn_off
metadata: {}
target:
entity_id: light.kitchen_accent_lights
data: {}
mode: restart