Restore lights to status they had before power outage

One way I have handled this in the past (and I’ve seen others do this too), is to create a “canary” light. Basically take a light that you never use. Maybe put it in a room that’s not used, or in my case I put it in an unused closet. Turn the light off with HA, then set an automation that if that light turns on (probably due to power outage), then turn it and every other yelight off

Here is mine

- alias: Zigbee Light Reset After Power Outage
  trigger:
  - platform: state
    entity_id:
      - light.canary_hue_bulb
    to: 'on'
  condition:
  - condition: numeric_state
    entity_id: sensor.ha_runtime_in_minutes
    above: 2
  - condition: or
    conditions:
    - condition: state
      entity_id: input_select.house_mode
      state: 'Night'
    - condition: state
      entity_id: input_select.house_mode
      state: 'Away'
  action:
  - service: light.turn_off
    entity_id:
      - light.bedroom_lamp_one
      - light.bedroom_lamp_two
      - light.bedroom_tv_lights
      - light.ashleys_room_lamp
      - light.guest_bedroom_lamp
      - light.frog_couch_backlight
      - light.all_downstairs_color_lights
      - light.office_lamp_two
      - light.office_lamp_one
      - light.canary_hue_bulb

Some of these are light groups, as well. In my case i mostly cared about this at night, where I’d be worken up with all my lights on

1 Like