Closed AlCalzone closed 1 week ago
This is probably a frontend bug with the color picker as I see a lot of conversions between HS and RGB, which means floating point math. Will be difficult to reproduce though
FWIW, I wasn't able to reproduce it with other values the CTT tests send. Only the 8 was problematic. Maybe we can get around it by explaining the difference in the corresponding documentation for the test house.
I managed to reproduce it on the frontend. If you set those values in the color picker and the device only supports HS mode, we do some conversions and set the wrong saturation value
The float error in the frontend turned out to be irrelevant and not fixable in a nice way. The problem is that core does floor
instead of round
in the conversion so I submitted a PR there
HA has improved conversions now and (8, 255, 255)
works but there is still floating point error so we might encounter this with another color in the future
The CTT tests send a report with RGB = (8, 255, 255), and asks whether the color component for red is 8, but the color picker in the HA frontend shows (7, 255, 255).