Skip to content

Commit

Permalink
Merge branch 'master' into suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
postlund authored Nov 11, 2020
2 parents e3a2a2b + a0f4fdf commit 2eee19f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions custom_components/localtuya/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,14 @@ def brightness(self):
@property
def hs_color(self):
"""Return the hs color value."""
if self._is_white_mode:
return None
return self._hs

@property
def color_temp(self):
"""Return the color_temp of the light."""
if self.has_config(CONF_COLOR_TEMP):
if self.has_config(CONF_COLOR_TEMP) and self._is_white_mode:
return int(
self._max_mired
- (
Expand Down Expand Up @@ -247,7 +249,7 @@ def status_updated(self):
if supported & SUPPORT_COLOR:
self._is_white_mode = self.dps_conf(CONF_COLOR_MODE) == "white"
if self._is_white_mode:
self._hs = [0, 0]
self._hs = None

if self._is_white_mode:
if supported & SUPPORT_BRIGHTNESS:
Expand Down

0 comments on commit 2eee19f

Please sign in to comment.