Easiest/best way to store default values for lights and use them in an automation?

Hi, so I’m sure I’m not alone in saying that sometimes I like to temporarily change the colors of my lights and LED strips and afterwards, especially while working, I like to have the lights brightness and color to be a specific value.

I was about to create a bunch of individual variables using the “Variables & History” addon, but the developer side of me thought that there surely has to be a better way.

For example, I was thinking of I could create an object array where the key is the light device id and then there would be two “columns” for brightness percent (int) and color (string). Then in the automation, ideally, it would look up the row and get a specific value based on the parameters passed in.

However, I don’t have the slightest idea if this is possible or if there’s an easier/better way to accomplish what I’m looking for.

Any ideas and input would be appreciated! Thanks!

this do what you want?

also there are light profiles.

Use scenes.

Make default scene, how you like the light default. Save it.

You can call the scene on the end of automation.

as @BebeMischa points out, there are also scenes.

scenes are particularly good if you have multiple preferred settings for the same light (or set of lights). like a “bright” mode, a “focus” mode, an “evening” mode, etc. scenes are also good if you want automation to snapshot whatever it is right now, do something different, then restore back to what it was.

profiles and defaults are good if you want a specific setting for the lights whenever someone hit “on” regardless of how they hit ‘on’. or if you want to put specific lights back to your preferred defaults (ie, so that you don’t have to create a scene for every possible combination).

Doh, I totally forgot about scenes. I got too lost in the programming mindset that I overlooked the obvious solution: Scenes :joy: thanks for replying! Sorry…

1 Like

Thanks for the link to my blueprint!

Unlike light profiles the blueprint handles color temperatures and non x/y colors.

1 Like