homebridge-hubitat-makerapi
homebridge-hubitat-makerapi copied to clipboard
RFC: hue should should not convert between 0-100 and 0-360
Because you are converting and rounding both directions, the hue that homekit sends often won't be what it gets back later.
example:
- Homekit sends
1
for hue. - That gets converted to
0
(Math.round(1/3.6) === 0
) and saved in hubitat. - Homekit asks for the hue later.
- Hubitat gives homebridge the
0
it saved earlier, then converts that to0
(Math.round(0*3.6) === 0
) and sends it to homekit.
This rounding error happens about 72% of the time.
It appears that homebridge RGB and RGBW drivers have a setting to send and receive hue in degrees (0-360), so the user would just need to set that for all of their RGB and RGBW lights.