HSL or HSV color definition possible in HA?

Hello to all,
I’m new to HA, and I’m still using a Hubitat C7 hub for my smart home. I’m actually evaluation my possibilities to migrate all my rules to HA. While Hubitat has some problems for Europeans like a missing support for TRV devices, Rule machine is very powerful (oldish interface). HA recognizes so many devices and opens so many possibilities BUT has some limitations I wasn’t prepared for.

One of these is the colour definition in only RGB. I have rules that change colours dynamically and this is quite easy with the HSV or HSL model where you just assign the value as a degree on the colour wheel if you don’t want to change the lightness, so values from 0 to 360 (actually 0-100 on Habitat due to an implementation in %). Doing this with RGB values seems extremely complicated. Is there a way to use HSL or HSV or any other methods that allow easely to cycle through colors without having to handle RGB ?

Trying mainly to do that :

Not sure about HSL / HSV as I haven’t heard of this before, but HA supports more than just RGB. It depends on the device you are using.

eg:
This is one of my lights I just turned on for the demo.

brightness: 186
hs_color: 37.412, 100
rgb_color: 255, 159, 0
xy_color: 0.57, 0.41

Thank you for the info. Is there a documentation of hs_color and xy_color ?

Just for info. The model I talk about is this one :


Hue is a value from 0 to 360 (degrees on the wheel). That makes it easy to say the next colour is the actual + 1, or 10 … if value > 360 than value = 0 and you can cycle through all colours. In my example the 2nd lamp has the opposite colour of the first (example 60 and (60+180) = 240. Both rotate by the same value.

Just play around with Developer Tools/Services —> light.turn_on

Select hs_color and one of the brightness values.

Documentation: Light - Home Assistant

1 Like

As with what pedolsky suggested, you can also look in Dev tools > states:

Thank you for your guidance. I will check out the possibilities and try to build my automation for dynamic lights. If my understanding is right, in hs_color the hs stands for Hue and Saturation, so basically it is a HSL mode without Luminance (Brightness) that you set up apart.

Thank you for your help