The HA docs don't say it explicitly (actually they do, see last link in previous paragraph), but a HA code comment does - HA converts from RGB to XY. I suspect it then converts back, and sends us the updated color, causing the sliders to jump.
This likely explains that sometimes when I move one dimension (say, G) another dimensions also jumps a bit.
The usual HA webinterface for coloured lights is a color circle. Most likely this is also the best one for us. The actual CIE shape might be easier to start with though, if we're building something ourselves. Even simpler would be to use https://docs.lvgl.io/8/widgets/extra/colorwheel.html, where HS becomes HS and V becomes, I think, brightness.
I haven't found lights with
rgb
insupported_color_modes
. Lights that say RGB on the box show up asxy
in HA, which appears to mean https://en.wikipedia.org/wiki/CIE_1931_color_space - a 2D space (although adding brightness as a dimension makes it a 3D space again). The RGB (but not RGBW/RGBWW) lights in thedemo:
instance offerhs
mode. If I read https://developers.home-assistant.io/docs/core/entity/light/#turn-on-light-device correctly, I think we can pretendhs
andxy
lights are RGB.The HA docs don't say it explicitly (actually they do, see last link in previous paragraph), but a HA code comment does - HA converts from RGB to XY. I suspect it then converts back, and sends us the updated color, causing the sliders to jump.
This likely explains that sometimes when I move one dimension (say, G) another dimensions also jumps a bit.
The usual HA webinterface for coloured lights is a color circle. Most likely this is also the best one for us. The actual CIE shape might be easier to start with though, if we're building something ourselves. Even simpler would be to use https://docs.lvgl.io/8/widgets/extra/colorwheel.html, where HS becomes HS and V becomes, I think, brightness.