alias: Front Lights - evening routine description: '' mode: single trigger: - platform: sun event: sunset offset: '-00:20:00' - platform: state entity_id: person.ruddog to: Neighborhood from: not_home - platform: time at: '23:00' - platform: homeassistant event: start - platform: sun event: sunrise offset: '-00:10:00' - platform: time at: '04:00' condition: [] action: - choose: - conditions: - condition: sun after: sunset after_offset: '-00:20:00' - condition: time before: '23:00' sequence: - service: switch.turn_on data: {} entity_id: switch.blue_led - conditions: - condition: or conditions: - condition: state entity_id: person.ruddog state: Neighborhood - condition: time after: '23:00' before: '04:00' sequence: - service: switch.turn_on data: {} entity_id: switch.blue_led - delay: '00:15:00' - service: switch.turn_off data: {} entity_id: switch.blue_led - conditions: - condition: time after: '04:00' - condition: sun before: sunrise before_offset: '-00:10:00' sequence: - service: switch.turn_on data: {} entity_id: switch.blue_led default: - service: switch.turn_off data: {} entity_id: switch.blue_led