#Flash Lights when doorbell triggered woes

1 messages · Page 1 of 1 (latest)

stone rapids
#

I’m trying to flash some lights a specific color when the Ring doorbell is pressed. The issue is they don’t restore to their previous state all the time(off or a certain color/brightness) after flashing – they just stay on the flash color. I want the lights to flash whether they’re on or off and go back to how they were.

Attached is my YAML. Any suggestions?

#
alias: Doorbell - Flash Lights
description: >-
  Flashes the lights blue and restores them to their previous state 3 times when
  the doorbell rings.
triggers:
  - entity_id: event.front_door_ding
    for:
      hours: 0
      minutes: 0
      seconds: 1
    trigger: state
conditions: []
actions:
  - data:
      scene_id: doorbell_light_restore
      snapshot_entities:
        - light.rear_1
        - light.rear_4
        - light.bedroom_lamp
        - light.computer_room
        - light.upstairs_living_room_lamp
    action: scene.create
  - repeat:
      count: 3
      sequence:
        - target:
            entity_id:
              - light.rear_1
              - light.rear_4
              - light.bedroom_lamp
              - light.computer_room
              - light.upstairs_living_room_lamp
          data:
            color_name: blue
            brightness: 255
          action: light.turn_on
        - target:
            entity_id: scene.doorbell_light_restore
          action: scene.turn_on
          data: {}
mode: single
opal grove
#

Hi @stone rapids
That looks off to me.
Can you fix the formatting so we can tell better. indents and spacing are everything in YAML.

south zealotBOT
#

To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.