mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-08 05:31:56 +00:00
* rgb(w) bulbs: fix hue/saturation conversion The attributes used to report Hue and Saturation can have a value of 0-254. We want to translate this to a percentage of 0-100%. The HA DTHs were dividing by 255 instead of the correct value of 254. Because the wrong divisor was used the result would be off by a percent about 25% of the time. The ZLL DTHs had the same bug plus they were also multipling the Hue by 360 instead of 100. * rgb(w) bulbs: set hue & saturation in a single command Previous two commands were being used to set Hue and Saturation. Now a single command is used and a transition time of 0 so the color changes must faster. * Don't rely on reporting for hue, saturation and color temperature Previously we were configuring the RGB(W) and Color Temperature bulbs to report any Hue, Saturation and Color Temperature changes. Now we manually read these attributes any time a command is executed that changes them.