Make LimitlessLED color/temperature attributes mutually exclusive (#15298)
This commit is contained in:
parent
c587536547
commit
b557c17f76
1 changed files with 6 additions and 1 deletions
|
@ -46,7 +46,7 @@ MIN_SATURATION = 10
|
|||
WHITE = [0, 0]
|
||||
|
||||
SUPPORT_LIMITLESSLED_WHITE = (SUPPORT_BRIGHTNESS | SUPPORT_COLOR_TEMP |
|
||||
SUPPORT_TRANSITION)
|
||||
SUPPORT_EFFECT | SUPPORT_TRANSITION)
|
||||
SUPPORT_LIMITLESSLED_DIMMER = (SUPPORT_BRIGHTNESS | SUPPORT_TRANSITION)
|
||||
SUPPORT_LIMITLESSLED_RGB = (SUPPORT_BRIGHTNESS | SUPPORT_EFFECT |
|
||||
SUPPORT_FLASH | SUPPORT_COLOR |
|
||||
|
@ -239,6 +239,8 @@ class LimitlessLEDGroup(Light):
|
|||
@property
|
||||
def color_temp(self):
|
||||
"""Return the temperature property."""
|
||||
if self.hs_color is not None:
|
||||
return None
|
||||
return self._temperature
|
||||
|
||||
@property
|
||||
|
@ -247,6 +249,9 @@ class LimitlessLEDGroup(Light):
|
|||
if self._effect == EFFECT_NIGHT:
|
||||
return None
|
||||
|
||||
if self._color is None or self._color[1] == 0:
|
||||
return None
|
||||
|
||||
return self._color
|
||||
|
||||
@property
|
||||
|
|
Loading…
Add table
Reference in a new issue