Hi, I’m trying to figure out why the following automation isn’t working and could use some help.
here’s the automation code
id: '1705475658593'
alias: Dining off no presence
description: Between sunset and 7 am
trigger:
- type: not_occupied
platform: device
device_id: ea397d9d58fdef3cd8536be113282c66
entity_id: 29f3a18fc5170be80d0b826be32fb5c3
domain: binary_sensor
for:
hours: 0
minutes: 10
seconds: 0
condition:
- condition: sun
after: sunset
- condition: time
before: '07:00:00'
action:
- service: light.turn_off
data: {}
target:
device_id:
- 42b4bbcabfbfad8256a4aa4ba333dc3c
- 1c0c67bc3dc0d6669ef54a373e2ffa5c
mode: single
Here’s the result (the trigger was triggered and the conditions were met - 11:37 PM so after sunset and before 7 AM)