Help needed with automation using scene.create & turn_on

Who can help me out with this automation?
I’m trying to make a ledstrip blink when a door opens, I can get it to blink, but I can’t get it back to its original color after the blinking.
The automation below makes the strip blink red once, but after that it always turns off, regardless of the state before blinking.

- id: '1602181918205'
  alias: Zolder - Ledstrip Knipperen
  trigger:
  - platform: state
    entity_id: binary_sensor.zolderdeur
    from: 'off'
    to: 'on'
  condition: []
  action:
  - service: scene.create
    data:
      scene_id: ledstrip_zolder_before
      snapshot_entities:
      - light.zolder_ledstrip
  - delay: 00:00:02
  - service: light.turn_on
    data:
      rgb_color:
      - 255
      - 0
      - 0
      brightness: 255
    entity_id: light.zolder_ledstrip
  - delay: 00:00:01
  - service: scene.turn_on
    data:
      entity_id: scene.ledstrip_zolder_before
  mode: single

scene.create & scene.turn_on, is the way to do this right?

With the above automation the scene ‘scene.ledstrip_zolder_before’ is created and it is selectable as a scene in the scene.turn_on.

So why is this not working correctly?

1 Like