Hi Team
I am trying to have motion-activated light, only to trigger between 11 pm to 5 am, and below is the code, however, this doesn’t work, and when I check the debug log, when the automation fired, now_time () was in iso-format and showed as 4 pm (while my local time was 12 am), hence light didn’t turn on. I have checked my time zone and it’s correct.
- condition: time
after: ‘23:00:00’
before: ‘05:00:00’
action: - type: turn_on
device_id: XXXXX
entity_id: switch.power_outlet
domain: switch
Any support is appreciated.