Skip to content

Commit

Permalink
Fixed Yeelight's color temperature conversion to RGB (#10831)
Browse files Browse the repository at this point in the history
  • Loading branch information
chocomega authored and balloob committed Nov 28, 2017
1 parent 72251e0 commit 934c194
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion homeassistant/components/light/yeelight.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ def _get_rgb_from_properties(self):

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'))
Expand Down

0 comments on commit 934c194

Please sign in to comment.