Fix yeelight_sunflower hs_color using RGB values (#36470)

This commit is contained in:
Lindsay Ward 2020-06-05 16:40:50 +10:00 committed by GitHub
parent f8e48a9230
commit a4204b440c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ class SunflowerBulb(LightEntity):
self._available = light.available
self._brightness = light.brightness
self._is_on = light.is_on
self._hs_color = light.rgb_color
self._rgb_color = light.rgb_color
self._unique_id = light.zid
@property
@ -75,7 +75,7 @@ class SunflowerBulb(LightEntity):
@property
def hs_color(self):
"""Return the color property."""
return self._hs_color
return color_util.color_RGB_to_hs(*self._rgb_color)
@property
def supported_features(self):
@ -109,4 +109,4 @@ class SunflowerBulb(LightEntity):
self._available = self._light.available
self._brightness = self._light.brightness
self._is_on = self._light.is_on
self._hs_color = color_util.color_RGB_to_hs(*self._light.rgb_color)
self._rgb_color = self._light.rgb_color