Hi!
Apologies if this question has already been posted in the forum (I’ve searched for a while but couldn’t find it).
I’m using the Philips Hue integration to control my lights. Whenver I set the nightlight scene, which sets the brightness to its minimum value (1), HA reports the value as 0, which essentially means the light is turned off. Except that its state is ‘on’. A strange side effect is that it also reports the color temperature as null for a few seconds then changes it to its actual value (451).
I’ve also tried controlling the lights from a library I built that sends REST API calls directly on the bridge. If I send brightness = 1, HA dev tools reports 0. If I send 2, HA reports 1. But if I send 254, it reports 255. So it seems there is a rounding issue.
The Philips Hue API documentation says that the brightness value must be between 1 and 254, but HA light.turn_on service supports values between 1 and 255.
Is this rounding error a known issue ? Should I compensate by assuming that if the state is ‘on’ and the brightness is 0, then it really is 1 ?