Fixed Yeelight's color temperature conversion to RGB (#10831)

This commit is contained in:
chocomega 2017-11-28 05:54:56 +01:00 committed by Paulus Schoutsen
parent 72251e0375
commit 934c19445d

View file

@ -222,7 +222,8 @@ class YeelightLight(Light):
color_mode = int(color_mode)
if color_mode == 2: # color temperature
return color_temperature_to_rgb(self.color_temp)
temp_in_k = mired_to_kelvin(self._color_temp)
return color_temperature_to_rgb(temp_in_k)
if color_mode == 3: # hsv
hue = int(self._properties.get('hue'))
sat = int(self._properties.get('sat'))