homebridge-hubitat-makerapi icon indicating copy to clipboard operation
homebridge-hubitat-makerapi copied to clipboard

RFC: hue should should not convert between 0-100 and 0-360

Open HelveticaScenario opened this issue 5 years ago • 0 comments

Because you are converting and rounding both directions, the hue that homekit sends often won't be what it gets back later.

example:

  1. Homekit sends 1 for hue.
  2. That gets converted to 0 (Math.round(1/3.6) === 0) and saved in hubitat.
  3. Homekit asks for the hue later.
  4. Hubitat gives homebridge the 0 it saved earlier, then converts that to 0 (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.

HelveticaScenario avatar Jul 28 '19 22:07 HelveticaScenario