Snapshot scene

Hi there,

Can anyone help me out please?

I try to make a automation for my doorbell.
When someone presses the doorbell it needs to flash my lights blue and than go back to the state before the bell was pressed.

this is what i have now:

alias: bel_flikker
description: Bel lampen laten knipperen.
trigger:
  - platform: state
    entity_id: binary_sensor.doorbell_button_state
    from: 'off'
    to: 'on'
condition: []
action:
  - service: scene.create
    data:
      snapshot_entities:
        - light.kleurstrip
        - light.keuken
        - light.werklamp
      scene_id: belscenee
  - service: light.turn_on
    target:
      entity_id:
        - light.keuken
        - light.kleurstrip
        - light.werklamp
    data:
      flash: long
      color_name: blue
      brightness_pct: 100
  - delay:
      hours: 0
      minutes: 0
      seconds: 16
      milliseconds: 0
  - service: scene.turn_on
    target:
      entity_id: scene.belscenee
mode: single

The scipt flashes but doesnt go back to the latest state. The lights stay blue.

Thanks in favour.

Martijn

1 Like

Did you try to set the scene from the developer console? If so when you did that, is it restoring to the original state.

If not try the following to create scene.

  - service: scene.create
    data:
      snapshot_entities: light.kleurstrip,light.keuken,light.werklamp
      scene_id: belscenee

Also try giving a delay in between the scene creation and flashing of the lights.

1 Like

i think the solutions was to give it just 1,5 sec delay to create the scene.

Thanks for the help!