So I looked around a bit and having a problem with Multiple Triggers having to be true.
I know that triggers operate under the or condition. If I want both triggers to be true before looking at conditions, is this the way to do it?
- alias: Bed Time
initial_state: true
trigger:
- platform: state
entity_id: sensor_a
to: 'on'
from: 'off'
for:
minutes: 2
- platform: state
entity_id: sensor_b
to: 'on'
from: 'off'
for:
minutes: 2
condition:
condition: and
conditions:
- condition: sun
after: sunset
- condition: time
before: '23:59:00'
action:
- service: light.turn_off
data:
entity_id:
- group.all_lights