I’m trying to figure out why an automation was triggered last night just after 1 am. Below are the conditions, which I THOUGHT were correct.
input_boolean.vacation_mode_boolean was definitely off. Thoughts?
condition:
condition: and
conditions:
- condition: state
entity_id: input_boolean.vacation_mode_boolean
state: 'off'
- condition: or
conditions:
- condition: sun
after: sunrise
- condition: time
before: '22:00:00'
@123 I think this is correct. 1 am is before 10 pm, so it would evaluate to true. I’m not sure why I was thinking that needed to be an OR. I just needed someone to point out my stupidity. Thank you!!!
What you might have been thinking of is when you want to constrain the time to be within sunrise and sunset. In that case, you do use a logical OR as shown in the documentation’s example for Sunrise-Sunset Condition:
condition:
condition: or
conditions:
- condition: sun
after: sunset
- condition: sun
before: sunrise
However, that’s because of the implicit ‘midnight boundary’ (explained in the docs).