🚨 Custom Blinking Lights Blueprint

Is anyone able to turn this into a script rather than an automation?

Hi!, got this same issue, thanks for the effort, any updates for this problem?

@rschutte this is super useful for me, I use it with motion notifications.

one question… I find that often it do not returning to initial color. Its stays on the set color in the automation.

Have you seen this issue? Could you add another option that allows us to not go to last state but set a specific color at the end?

2 Likes

Would be great to have a way to determine the (relative) brightness for the notification. I want to use to see doorbell when during a meeting, and this currently currently blinking too bright :slight_smile: of course it can be solved taking control, but that defeats the purpose of a blueprint! :wink:

So not always flash at 255 brightness, but instead flash at 127 brightness, of flash at +50 brightness relatieve to current brightness.

Hi,

I’m using this blueprint to let me know when someone is ringing my Eufy doorbell. Works great!

What’s odd, is that every time I restart the Home Assistant Yellow, the automation appears to be triggered and the lights blink.

Has anybody else seen that?

Hi

Amazing blueprint and thanks for those who explained that it needs linking to the entity not the device!

Is there any way of having this as a standalone automation which can be triggered by other automations. Presently the trigger is built into this blueprint.

Sorted via chatgpt

if anybody wants the code its:

blueprint:
  name: Blinking Lights with Restore and Transition Trigger Removed
  description:
    Blink selected lights in a specific color and restore their original
    state, with custom transition support.
  domain: automation
  input:
    lights:
      name: Lights
      description: Select the lights to blink.
      selector:
        target:
          entity:
            - domain:
                - light
    color:
      name: Blink Color
      description: Choose a color for blinking.
      selector:
        color_rgb: {}
    blink_count:
      name: Blink Count
      description: How many times should the lights blink?
      default: 3
      selector:
        number:
          min: 1.0
          max: 10.0
          step: 1.0
          mode: slider
    blink_duration:
      name: Blink Duration (seconds)
      description: How long should each blink last?
      default: 1
      selector:
        number:
          min: 0.1
          max: 5.0
          step: 0.1
          mode: slider
    flash_with_off:
      name: Flash with Off
      description:
        Turn off lights between blinks? If unchecked, the lights will return
        to their original color between blinks.
      default: true
      selector:
        boolean: {}
    transition_length:
      name: Transition Length (seconds)
      description: Set a custom transition time for the lights (overrides device default).
      default: 0.5
      selector:
        number:
          min: 0.0
          max: 5.0
          step: 0.1
          mode: slider
  source_url: https://community.home-assistant.io/t/custom-blinking-lights-blueprint/796494
mode: restart
variables:
  lights: !input lights
  blink_count: !input blink_count
  blink_duration: !input blink_duration
  color: !input color
  flash_with_off: !input flash_with_off
  transition_length: !input transition_length
trigger: []
action:
  - service: scene.create
    data:
      scene_id: light_restore_scene
      snapshot_entities: "{{ lights.entity_id }}"
  - repeat:
      count: "{{ blink_count }}"
      sequence:
        - service: light.turn_on
          target: "{{ lights }}"
          data:
            rgb_color: "{{ color }}"
            brightness: 255
            transition: "{{ transition_length }}"
        - delay: "{{ blink_duration | float }}"
        - choose:
            - conditions:
                - condition: template
                  value_template: "{{ flash_with_off }}"
              sequence:
                - service: light.turn_off
                  target: "{{ lights }}"
                  data:
                    transition: "{{ transition_length }}"
            - conditions:
                - condition: template
                  value_template: "{{ not flash_with_off }}"
              sequence:
                - service: scene.turn_on
                  data:
                    entity_id: scene.light_restore_scene
        - delay: "{{ blink_duration | float }}"
  - service: scene.turn_on
    data:
      entity_id: scene.light_restore_scene

Not sure what you try to achieve, the blueprint works also fine when triggered manually?

You probably need to configure the to state of the trigger entity.

Thank you very much for the job.
I would to know if it is possible to do my example:
I have 12 spots around the house. My idea in case of alarm, is to do a random blink with three different colour, white, blue and red, like the police. Today I am using your blueprint 3 times with the same trigger and is working well but the general effect is not like the police light on their car.
Do you have an idea?
thanks in advance

Hey.
I’m going to need some too, did you get your answer?

I ended up creating my own Flashing Lights Script

Hi, sorry for not replying sooner.
I have “From State: Not Running” and “To State: Running” when the doorbell is ringing.

It works fine when some rings the bell, or if I trigger manually, but it also triggers when the Home Assistant device is restarted. Really puzzling.

Actually, I might have the same issue as @rayte

I am getting this error even with one single IKEA Tradfri LED.

Figured it out: Error appears when I choose the device. Choosing the lamp entity of the device works fine.

Hi, I’ve imported your blueprint and noticed I wasn’t able to create an automation in the typical way I’m used to where it has “When”, “And if” and “Then do”.

What I’ve done to get around this is create a separate automation which triggers an Entity and Attribute, with no “And if” or “Then do”, and then used this blueprint to create an automation which brings in that automation as the Trigger Entity. Would that work?

I’m using ha-teamtracker and trying to use a team scoring as the trigger to initiate the automation.

Hello. Tried your automation. Looks good, expect 1 little thingy. It looks like it repeats the flashing. For example, if I set blink count to 3, it will blink 6 times, 3 times a little pause then 3 times again. If I set it to 2, it will blink two times.

The trigger that I have is a PIR motion sensor, but it can only do occupancy. I set from state ‘clear’ and to state ‘detected’. By default the sensor will return to ‘clear’ after around 9 seconds, even if no presence is detected any more. But It will blink the bulbs in the aforementioned double intervals regardless.