#Turn off Lights when everyone leaves, Turn them back on when someone arrives home.

1 messages · Page 1 of 1 (latest)

drifting lily
#

Hey I'm having some trouble with two automations that I have. The first automation should snapshot all lights and then turn them all off when it detects that everyone's left the home. The second automation should restore the snapshot when someone arrives home.

The lights are turning off fine, but then when we get home they're not turning back on. There's many triggers for the when someone is home piece, so I don't think that's the issue, but I can't tell if its having trouble restoring the snapshot or what. Any Suggestions on how to debug?

alias: Turn Off Lights When Everyone Leaves
description: ""
mode: single
triggers:
  - entity_id:
      - binary_sensor.someone_is_home
    to: "off"
    for:
      hours: 0
      minutes: 15
      seconds: 0
    trigger: state
conditions: []
actions:
  - metadata: {}
    data:
      scene_id: lights_when_everyone_left
      snapshot_entities:
        - light.cigar_chandelier
        - light.cigar_sconces
        - light.cigar_pocket_accents
        - light.kitchen_accents
        - light.kitchen_cans
        - light.kitchen_nook_lamps
        - light.kitchen_table
        - light.island_chandelier
        - light.pool_bath_hall
        - light.porch_cans
        - light.front_porch_chandelier
        - light.dining_accents
        - light.dining_chandelier
        - light.hood_light
        - light.stair_chandelier
        - light.stair_hall
        - light.foyer_cans
        - light.foyer_chandelier
        - light.side_light
        - light.living_cans
        - light.living_nook_accents
    action: scene.create
  - metadata: {}
    target:
      entity_id: scene.all_off
    action: scene.turn_on
  - action: input_boolean.turn_on
    target:
      entity_id:
        - input_boolean.lightsturnedoffbecauseeveryoneleft
    data: {}
alias: Turn back on lights when someone returns home.
description: ""
mode: single
triggers:
  - entity_id:
      - binary_sensor.driveway_vehicle_detected
    to: "on"
    trigger: state
  - entity_id:
      - binary_sensor.someone_is_home
    to: "on"
    trigger: state
  - type: motion
    device_id: 93c15f212fcb9bae7fc7067f4aac1ab8
    entity_id: 8940ffc5e53ebee73fbef8b5b5063201
    domain: binary_sensor
    trigger: device
conditions:
  - condition: state
    entity_id: input_boolean.lightsturnedoffbecauseeveryoneleft
    state: "on"
actions:
  - metadata: {}
    target:
      entity_id: scene.lights_when_everyone_left
    action: scene.turn_on
  - action: input_boolean.turn_off
    target:
      entity_id: input_boolean.lightsturnedoffbecauseeveryoneleft
    data: {}
drifting lily
#

it appeared to be an issue with my scene create, the light names had changed.