Hi everyone. From unknown to me reason below automation was never triggered.
- id: motion_in_bathroom_turn_on_LED_light
alias: If there is motion in bathroom turn on the light
trigger:
platform: state
entity_id:
- binary_sensor.motion_sensor_158d0001f9d56d
- binary_sensor.motion_sensor_158d000200cc5f
from: 'off'
to: 'on'
condition:
condition: and
conditions:
- condition: time
after: '00:00:00'
- condition: time
before: '06:00:00'
action:
service: switch.turn_on
entity_id: switch.bathroom_led_light
I’m running similar automation (just different light to be switched on in different hours) and that works just great. If I change above condition to be executed somewhere in the middle of day, then it works just fine, but when I try to start it between two days (at night) then it never triggers.
My intention is simply to run this automation between some specific hours. In above example between midnight and 6am.
What could be the problem? What I’m missing here?