- alias: 'Turn Outdoor Lights on before Sunset'
  trigger:
    platform: state
    entity_id: sensor.period_of_day
    from: 'Day'
    to: 'Sunset'
  action:
    - service: light.turn_on
      data:
        entity_id: group.outdoor_lights

- alias: 'Turn Outdoor Lights off in the Night when Away'
  trigger:
    platform: time
    at: '01:00:00'
  condition:
    condition: state
    entity_id: input_boolean.away_mode
    state: 'on'
  action:
    - service: light.turn_off
      data:
        entity_id: group.outdoor_lights

- alias: 'Turn Outdoor Lights off after Sunrise'
  trigger:
    platform: state
    entity_id: sensor.period_of_day
    from: 'Sunrise'
    to: 'Day'
  action:
    - service: light.turn_off
      data:
        entity_id: group.outdoor_lights

- alias: 'Turn Outdoor Lights on before Sunset'
  trigger:
    platform: state
    entity_id: sensor.period_of_day
    from: 'Day'
    to: 'Sunset'
  action:
    - service: light.turn_on
      data:
        entity_id: group.outdoor_lights

- alias: 'Turn Outdoor Lights off after Sunrise'
  trigger:
    platform: state
    entity_id: sensor.period_of_day
    from: 'Sunrise'
    to: 'Day'
  action:
    - service: light.turn_off
      data:
        entity_id: group.outdoor_lights

- alias: 'Turn Outdoor Lights off in the Night when Away'
  trigger:
    platform: time
    at: '01:00:00'
  condition:
    condition: state
    entity_id: input_boolean.away_mode
    state: 'on'
  action:
    - service: light.turn_off
      data:
        entity_id: group.outdoor_lights

Reorder automations of outdoor lights
Reorder automations of outdoor lights
