Color Loop Blueprint with Configurable Colors and Transition Time

Have been searching for something to make my exterior lights transition through red to orange during the Halloween month. I think I’ve found my answer.

I’m currently transitioning with just two colors - a deep red and a dark/burnt orange. Working on the timing to make it smooth and like a heart beat or breathing, but pretty darn happy with the 10 mins of config I’ve done so far.

Thanks for a great blueprint!

1 Like

I have a bunch of lights out front that light the front of the house.

I have migrated away from my hue hub. I did like the hue dynamic (hue labs) scenes that were possible with the hue hub. Given a group of lights each would cycle through a colour palette. At any one time there was a mix of colours being used.

I am interested in this blueprint to replicate that now that I am no longer using the hue hub. As far as I can tell if I give this blueprint a group of lights all lights in that group would be on the same colour at the same time.

Is it possible to have it so that each light is on a different colour out of the chosen colours?

The only way I see that happening is if I have multiple copies of this blueprint running, one per light. I have 14 lights out front so that might / would end up being cumbersome.

Thank you.

Yes right now, with this blueprint that’s the only way you would be able to have different color palettes occurring on different lights.

You can also add a custom Toggle Helper and reference it in all of the blueprints to have one “switch” toggle the color transitions for all lights/blueprints at once.

If you know how to deal with the yaml behind the scenes, it would be less cumbersome to make one blueprint, edit its yaml, then copy/paste the yaml to other blueprints for different lights.

1 Like

Hi, Thanks for all your efforts.
Running the automation at 2 second transition time and I am getting this error.

Stopped because an error was encountered at 31 October 2023 at 12:00:44 (runtime: 10.43 seconds)

Could not load a dict; the given string is not valid JSON.: line 1 column 16 (char 15)

The automation just stops, any ideas.
Many thanks

PS I have left on for about 30 minutes on a transition of 10s and it seem ok (but is more like 5 seconds rather than 10)

Would it be possible to allow this (maybe even an option in the UI) to select the next color randomly? I know it’s called “Color Loop”. I would like my set of outside lights to slowly fade through the colors I’ve selected but randomly, so they all seem to have their own color sequence. I’ve not looked at the code yet, as I’m pretty new to HA, but I am about to do that.

what about cycling between scenes of lights?

I’m a bit confused as to what I have to do to have all lights within a group switch to different colours. I currently have one helper, and an automation for light01 to light10. All 10 lights automation are using the 3 x 255 rgb setting as suggested (which seems to go through all the color wheel). However all lights are switching to the same exact color at all times. not sure what I’m missing …

edit1:

it seems like if I turn on the individual lights in the group one after the other (waiting for the previous to change color), I can get them to be all different, in this group I have 10 bulbs so it takes a pretty long time to get this going.

The automation in the blueprint sends commands to an entity. That can be a group or a single light. But the commands are all the same. Apparently you can trick the timing by switching things off and on.
A way to do it that takes some upfront work but is easy afterwards, is like this:you use the blueprint to make a number of different automation, but you link them all to the same helper. Then you can control each color order and timing individually but switch on the looping with a single button.
I don’t know if it is possible in YAML to extract the members of a group. If that is possible, it would be possible to change the blueprint such that it automatically gives random time offsets to the different members. I guess that would increase Zigbee traffic though.

Edit:didn’t read your post well enough. You already have individual automations. In that case, change the color order and/or timing for each light. I think it would also not be hard to add a random start delay to the blueprint, and add an input for that.

@mdolnik , I went ahead and built in this random start delay into the blueprint. It was a fun excercise, YAML isn’t exactly my native language :laughing:. I made a fork for it on Github Gist but it’s such a small edit that it would be a bit weird to start a whole new fork for it. Perhaps you can update the blueprint? See the code here:

1 Like

HI
Created a Christmas loop for my outside house lights, just consisting of green and red but I am also getting a yellow from nowhere, which is between colour changes so it more annoying as it is twice the rate of the green and red, I have also checked the Tapo app to check for defaults and states etc but i have a default state of white, any ideas?

Thanks

I do believe this is a side effect of how the blueprint works, if you look at the top few posts where author shows the color wheel and how the script “travels” across it, it becomes apparent that on the way from red to green and vice versa you have to pass yellow twice.

I personally haven’t tried suggestions from this thread, but you might find some inspiration there, since you look to emulate xmas lights ie blinking lights not a color loop per se: Blinking Holiday Lights? Best Approach - #5 by dailand

I trying to just put a simple light to the blueprint but. Get this message

Message malformed: Entity IDs cannotn be None for dictionary value @ data|‘condition’][O][conditions’][0]

l’entity_id"]

When I’m trying to save

Running on latest HA on a rpi4

The light i a ostam led strip and it works as a normal light in HA

type or paste code here

Thanks for letting me know, Sorry for the delay, appreciate your input

1 Like

@mdolnik

I’m finding some color-syncing issues. Is that why you were experimenting with a delay randomizer, @allard77 ?

I’ve got all of the lights I want to change color in a Z2M group (~dozen Philips Hue Downlights, ~dozen Gledopto LED light strips).

I find when I activate the Automation via the Blueprint (v 2.0.0), the Philips lag behind the Gledopto-controlled lights (even though they are in the same Z2M group). FWIW, the Philips lights, however, always stay in sync with themselves, as do the Gledopto LED strips.

I’ve tried with a separate toggle, as well as simply using the same Light Group Entity as the Color Loop Toggle. Same Results: The Philips lag behind the other lights in the group, by ~10-~15 seconds. However, the Philips seem to skip the first color (blue), and start to fade into the second-ish color, Pink. It sounds dumb, but they seem to hang on the original color (usually warm or cool white), and then realize they need to be in sync with the others, so they skip blue, jump to pink-ish, but are still lagging.

I have all of the colors set (12 colors, Blue-Purple-Pink-Red-Orange-Yellow-Green-Blue). I’ve confirmed that all of the lights can display all of the colors individually.

Transition Time: 10 seconds
Max Color Distance: 180
Max Changes Per Second: 1

CPU is only hitting about 25%.

Also, FWIW, when I activate any separate scenes (e.g. not using the Color Loop Blueprint), the Philips and Gledopto lights all react almost instantly.

Edit: If I add a separate Toggle for the Automation - and I toggle it while the Automation is running, the Philips “jump” to the color the Gledoptos are at, and the Automation pauses.

  • Core 2024.5.3
  • Supervisor 2024.05.1
  • Operating System12.3
  • Frontend 20240501.1

What could I be missing? Thanks!

I’ve run this blueprint in the past without a problem. However, I’m now re-visiting it because I have some LED strips that I’m integrating. It’s not working for me anymore, with any of my lights. The hugalafutro Color Loop is, as is the Twanne Party Lights, so I’m sure the LED strip and my other test lights are functioning.

I wonder if something broke in the latest updates. I’m on HA 2024.6.4. Is anyone else having problems? Thanks!

I just tested mine for you. It works as it always has. I’m on 2024.7.1 so I doubt it’s the updates.

1 Like

I have added some functionality to a fork of this blueprint:

  • Added support for multiple light/group entities.
  • Avoid terminating the Automation on light errors (eg. if a light is temporarily unavailable).
  • Added a “Hold Time” setting (to hold on the specified color before transitioning again; Set this to 0 for the original behavior).
  • Adjusted code to allow the “Transition Time” setting to be 0 (to permit color jumps without transitions).
  • Added documentation for using wildcards in the entities list for the recorder config.

@mdolnik Feel free to either merge my changes or tell me I should maintain this as a separate/independent Blueprint. Thanks for all your work on this!

To switch to my version without deleting and re-creating the Blueprint and all associated Automations:

Settings -> Add-ons -> Terminal -> OPEN WEB UI
  URL='https://github.com/PaulSD/ha_color_loop/blob/main/color_loop.yaml'
  sed -i -e 's!^\(\s*source_url:\s\+\).*!\1'"$URL!" config/blueprints/automation/mdolnik/color_loop.yaml
  ha core restart
  exit

Settings -> Automations & scenes -> Blueprints
(If you opened this page before `ha core restart` then you must reload it before re-import)
-> ... (next to "Color Loop") -> Re-import blueprint -> RE-IMPORT

To switch back to the original, do the same again but use the original URL:

URL='https://gist.github.com/mdolnik/7147b5df4b08f7979afad02a5dd137a2'
2 Likes

Got this blueprint working, loving having a colour loop back in action so super appreciative of the hard work! I have a GLEDOPTO zigbee LED bar and the default “colorloop” effect on the card does not work.

A couple of questions, I am hoping someone can assist as my searching has been a fail.

  1. Is there a way to replace the default/inherited effect list (i.e. “colorloop”) attached to a light with an automation such as this blueprint so it becomes useable again?
    image

  2. Can anyone please share their RGB lists or is there a good source to get some different colour lists that people are using to add to the automation - e.g. a soft colour list, a hard colour list, xmas colours, etc. - rather than manually sliding and selecting each time (which has been tedious and hit and miss). Maybe these shared lists can be added to the blueprint as pre-configured colour sets?

Throwing this out there, maybe it will help.

Even if it doesn’t help directly, the code has a listing of all the listed Home Assistant color ‘names’ and the RGB code for them. You can install it thru HACS as a custom_template.

1 Like

Just discovered this blueprint. Regarding the warning about overdoing the color transitions at a quick pace - does that still apply given this change in HA 2024.08?