Fix mysensors light turn on hs color (#13349)

This commit is contained in:
Martin Hjelmare 2018-03-21 02:26:56 +01:00 committed by Paulus Schoutsen
parent cfb0b00c0c
commit 3426487277

View file

@ -107,7 +107,11 @@ class MySensorsLight(mysensors.MySensorsEntity, Light):
rgb = color_util.color_hs_to_RGB(*self._hs)
white = self._white
hex_color = self._values.get(self.value_type)
new_rgb = color_util.color_hs_to_RGB(*kwargs.get(ATTR_HS_COLOR))
hs_color = kwargs.get(ATTR_HS_COLOR)
if hs_color is not None:
new_rgb = color_util.color_hs_to_RGB(*hs_color)
else:
new_rgb = None
new_white = kwargs.get(ATTR_WHITE_VALUE)
if new_rgb is None and new_white is None: