For some reason the below automation is still being processed after sunrise and I can’t see what is wrong to cause that. The condition should be stopping it. This is one of my few Automations created using the GUI editor (I just switched to YAML to post it here) so perhaps I’m missing some indentation or something?
code
alias: Back Yard Festoon Lights Auto
description: Turn the back yard festoon lights on and off at night based on motion
trigger:
- platform: state
entity_id:
- binary_sensor.paradox_z6_alfresco_pir
to: "on"
id: "on"
- platform: state
entity_id:
- binary_sensor.paradox_z6_alfresco_pir
to: "off"
for:
hours: 0
minutes: 20
seconds: 0
id: "off"
condition:
- condition: sun
after: sunset
after_offset: "00:30:00"
before: sunrise
before_offset: "01:30:00"
action:
- choose:
- conditions:
- condition: trigger
id: "on"
sequence:
- choose:
- conditions:
- condition: time
after: "22:00:00"
weekday:
- sun
- mon
- tue
- wed
- thu
- fri
- sat
sequence:
- service: light.turn_on
data: {}
target:
entity_id: light.back_yard_festoon_lights_1
- delay:
hours: 0
minutes: 2
seconds: 0
milliseconds: 0
- service: light.turn_off
data: {}
target:
entity_id: light.back_yard_festoon_lights_1
- conditions:
- condition: time
before: "22:00:00"
weekday:
- sat
- fri
- thu
- wed
- tue
- mon
- sun
sequence:
- service: light.turn_on
data: {}
target:
entity_id: light.back_yard_festoon_lights_1
- delay:
hours: 0
minutes: 15
seconds: 0
milliseconds: 0
- service: light.turn_off
data: {}
target:
entity_id: light.back_yard_festoon_lights_1
- conditions:
- condition: trigger
id: "off"
sequence:
- service: light.turn_off
data: {}
target:
entity_id: light.back_yard_festoon_lights_1
trace:
stored_traces: 40
mode: single
Can anyone see what I’ve missed?