I got the link working by following what the My integration was passing along and it’s redirecting to https://raw.githubusercontent.com/edwardtfn/ha_blueprints/main/script/EdwardTFN/blink_lights.yaml (the automation link). Maybe the links need corrected to point to the raw.githubusercontent.com domain?
Hey!
Sorry, let me try to clarify:
- When I click on the import button then open it in HomeAssistant, it gives the link https://github.com/edwardtfn/ha_blueprints/raw/main/script/EdwardTFN/blink_lights.yaml to HomeAssistant
- When I open that link directly (outside of HA), it redirects me to https://raw.githubusercontent.com/edwardtfn/ha_blueprints/main/script/EdwardTFN/blink_lights.yaml
Maybe the redirect is confusing HA and causing it to fail?
Aha!
Now I got it! Thanks for clarifying.
What about these new links:
If this one works I will fix on all my previous posts.
That did it! No more errors for me when trying to import either of them
By looking at your automation and your script to blink lights, I can see it uses mode: single
, which means multiple simultaneous executions will be ignored. I imagine this is probably fine if each script/automation instance only controls a single subset of the lights. However, if someone tries to be “smarter” and make the script (or automation) take the lights as parameters, then we are in trouble.
For me, this is yet another example of a subtle way things can go wrong because there is no native support for blinking in HA core. Which is yet another argument in favor to what I asked in the top of this thread.
(Note: I have nothing against you, @EdwardTFN, and nothing against your blueprints.) (Note 2: I haven’t had time to try your blueprints, and thus haven’t tried under those racing conditions.)
@ EdwardTFN Thanks for the blueprints. I can’t get the script blueprint to show any inputs though. I suspect fields
should be input
?
Edit:
Something like this? https://gitlab.com/filmkorn/ha_blueprints/-/raw/main/blink_lights.yaml
For anyone reading - light.toggle
is unreliable. if your lights support it, use light.turn_on service’s flash
option.
wow, what a journey
The problem I had:
- Some light stay on when I used any kind of flash or toggle automation
I see in the logs from zigbee2mqtt that homeassistant always send a “on” plus the effect. So I end up with sending mqtt messages:
alias: MqttBlink
description: ""
trigger:
- type: turned_on
platform: device
device_id: yyyyyyyyyyyyyyxxxxxxxxxxxxxxxxxx
entity_id: uuuuuuuuuuuuuuxxxxxxxxxxxxxxxxxx
domain: binary_sensor
condition:
- condition: time
after: "06:00:00"
before: "21:00:00"
action:
- service: mqtt.publish
data:
topic: zigbee2mqtt/0x001788010yyyyyyy/set
#Light_Hall
payload: "{\"effect\":\"blink\"}"
- service: mqtt.publish
data:
topic: zigbee2mqtt/0x001788010ggggggg/set
#Light_LivR_Couch
payload: "{\"effect\":\"blink\"}"
- service: mqtt.publish
data:
topic: zigbee2mqtt/0x001788010uuuuuuu/set
#Light_My_Own_McDonalds_in_Basement
payload: "{\"effect\":\"blink\"}"
- service: mqtt.publish
data:
topic: zigbee2mqtt/0x001788010xxxxxxx/set
#Light_Catroom
payload: "{\"effect\":\"blink\"}"
- service: mqtt.publish
data:
topic: zigbee2mqtt/0x001788010448a00a/set
#Light_Kinddom_Garden
payload: "{\"effect\":\"blink\"}"
- service: mqtt.publish
data:
topic: zigbee2mqtt/0x001788010ppppppp/set
#Light_Fireplace
payload: "{\"effect\":\"blink\"}"
- service: mqtt.publish
data:
topic: zigbee2mqtt/0x001788010wwwwwww/set
#Light_Restroom
payload: "{\"effect\":\"blink\"}"
mode: queued
max: 5
This works very good!
But because my next plan is to used special color-codes with flash, I think I need a kind of state-memory where the automation can revert then…
If you have no blink effect you can also use toggle with some delay:
alias: Kind-of-a-Light-Flash
description: ""
trigger:
- type: turned_on
platform: device
device_id: yyyyyyyyyyyyyyxxxxxxxxxxxxxxxxxx
entity_id: uuuuuuuuuuuuuuxxxxxxxxxxxxxxxxxx
domain: binary_sensor
condition:
- condition: time
after: "06:00:00"
before: "21:00:00"
action:
- service: light.toggle
data: {}
target:
device_id:
- iiiiiiiiiiyyyyyyxxxxxxxxxxxxxxxx
- gggggggggggggggghhhhhhhhhhhhhhhh
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 700
- service: light.toggle
data: {}
target:
device_id:
- iiiiiiiiiiyyyyyyxxxxxxxxxxxxxxxx
- gggggggggggggggghhhhhhhhhhhhhhhh
mode: queued
max: 5
How do I know if my light supports it? Will there be an error in the logs if I try to use it and the light doesn’t support it? Or will the problem be silently ignored? Is there a difference in behavior/implementation of flash
between zigbee vs wifi lightbulbs?
Alright, so it isn’t there on my list of effects:
I was asking because I’ve tried to use flash
on the lightbulb, but it didn’t work → and yet I haven’t seen any error or nothing, so I wasn’t sure if it’s me, or the HA, or the lightbulb
Everything effect, but blink
I’ll try it with one of my Hue bulbs.