This service call will set a random color. Examples based on rgb_color will often make the light pale or even white. The example below uses hs_color (hue/saturation) to always select an actual color. The color in this example will have a random 80%-100% saturation and full brightness.
The next example cycles a light through all saturated colors. It will move around the color wheel by 30 degrees each time it is called, for example when pressing a button (that makes it 12 steps though all colors).
and how can i imagine the calculation line?!
I mean you are “reading” the first element of the hs_color this is [0] and add 30, right?! Or where do i find a good explanation for this kind of super squeezed one line calculation
The standard light integration has built-in colorloop and random colors. See the effect attribute. effect: colorloop will make the light change color continuously. effect: random will set a static random color.
That’s right, the effects depend on device specific implementation. I noticed that also deconz unfortunately is missing the random effect.
I guess it’s time for me to learn Python and get to work!
If you guys are looking for a smooth change of color and wanted to change it with a controller, I recommend you to take a look to ControllerX, which is an AppDaemon app that allows binding remotes with lights and media players.
In the case of color lights, ControllerX detects automatically the type of light and it goes through a loop of colors when pressing the controller. Here you have an example of this. You can check the documentation in here to know the supported controllers.
Have been using this template for my RGBCCT bulbs for a long time and it has been working so well.
But after the 2021.8.0 update, I have seen that my color wheel also shows the White and Warm Slider, which was not present before. I did also update all bulbs to the latest esphome after the updates, so I’m not 100% sure whether it could be that which is giving me issues.
What I experience is, when pushing the button now, it just changes from one white to another. I never get any colors.
What do I need to add to this in order to set warm and cold to 0?
Searching through forum trying to figure out how to set the color on my Slyvania outside lights.
I check the entity and it has an attribute called ‘h’ and ‘hue’ but when I call it I get an error in my logs that says:
Error while executing automation automation.98_turn_on_outside_lights: extra keys not allowed @ data['hue']
Error while executing automation automation.98_turn_on_outside_lights: extra keys not allowed @ data['h']
Which is funny because it does indeed know I’m trying to call it because it gives me those 2 errors ‘hue’ and ‘h’… which are both listed in the attributes.
Here’s the automation I’m using that gives me the error:
Error while executing automation automation.98_turn_on_outside_lights: extra keys not allowed @ data['hue']
Error while executing automation automation.98_turn_on_outside_lights: extra keys not allowed @ data['h']
Error while executing automation automation.98_turn_on_outside_lights: extra keys not allowed @ data['hs_color:']
So that tells me it knows I’m trying to set ‘hue’ color but it says ‘No’
This is my listed attributes:
Not sure but leaning on my old php days wouldn’t that be ‘Color[0].hue’?