Closed BrainDamage closed 2 years ago
This is normal, because the auto coloring haven't been implemented yet.
If someone wants to work on this, all we need is a function to convert x,y
to r,g,b
.
FYI, here is the function used in Home Assistant, but it looks really complex...
I face that problem too and here I read, others suffer also :( in my project it is essential to send the particular xy_color values to the devices because they will always report their state as xy_color and some code inbetween has to check/compare. So calculation results from conversion of rgb to xy will not help.
here they offer xy_color as an option https://www.home-assistant.io/integrations/light#service-lightturn_on
and this is, what I tried
xy_color: (spaces) - 0.5621 (spaces) - 0.4166
xy_color: (0.5621, 0.4166)
xy_color: [0.5621, 0.4166]
all shown as HEX (#): 7F848E in the card
Hi Walter, the 2 following syntaxes should work:
- xy_color: [0.5621, 0.4166]
- xy_color:
- 0.5621
- 0.4166
The issue is that the icons will be grey by default, but the icons are supposed to work if you click on them.
You can set the icon color by using the icon_color
option.
thank you so much. This way it works. Set xy_color
for the light and icon_color
for the ball:
- xy_color:
- 0.7006
- 0.2993
icon_color: rgb(255, 0, 24)
brightness: 100
Hey, So I was just taking a look at this because I have my HA set up with light_profiles and I was trying to set up this card. I came across this js-CIE-1931-rgb-color-converter repo which converts from x,y, brightness values to RGB in JS. It might be a bit too much code to include in this card for a minimal result but so far( in my tests at least) its given accurate colors :)
This feature is now available is version 1.10.0 🎉
Icon auto-coloring doesn't work when using xy_color mode, it always displays a grey icon no matter the colour or the brightness