mirror of
https://github.com/home-assistant/core.git
synced 2025-07-11 07:17:12 +00:00
Make LimitlessLED color/temperature attributes mutually exclusive (#15298)
This commit is contained in:
parent
c587536547
commit
b557c17f76
@ -46,7 +46,7 @@ MIN_SATURATION = 10
|
|||||||
WHITE = [0, 0]
|
WHITE = [0, 0]
|
||||||
|
|
||||||
SUPPORT_LIMITLESSLED_WHITE = (SUPPORT_BRIGHTNESS | SUPPORT_COLOR_TEMP |
|
SUPPORT_LIMITLESSLED_WHITE = (SUPPORT_BRIGHTNESS | SUPPORT_COLOR_TEMP |
|
||||||
SUPPORT_TRANSITION)
|
SUPPORT_EFFECT | SUPPORT_TRANSITION)
|
||||||
SUPPORT_LIMITLESSLED_DIMMER = (SUPPORT_BRIGHTNESS | SUPPORT_TRANSITION)
|
SUPPORT_LIMITLESSLED_DIMMER = (SUPPORT_BRIGHTNESS | SUPPORT_TRANSITION)
|
||||||
SUPPORT_LIMITLESSLED_RGB = (SUPPORT_BRIGHTNESS | SUPPORT_EFFECT |
|
SUPPORT_LIMITLESSLED_RGB = (SUPPORT_BRIGHTNESS | SUPPORT_EFFECT |
|
||||||
SUPPORT_FLASH | SUPPORT_COLOR |
|
SUPPORT_FLASH | SUPPORT_COLOR |
|
||||||
@ -239,6 +239,8 @@ class LimitlessLEDGroup(Light):
|
|||||||
@property
|
@property
|
||||||
def color_temp(self):
|
def color_temp(self):
|
||||||
"""Return the temperature property."""
|
"""Return the temperature property."""
|
||||||
|
if self.hs_color is not None:
|
||||||
|
return None
|
||||||
return self._temperature
|
return self._temperature
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -247,6 +249,9 @@ class LimitlessLEDGroup(Light):
|
|||||||
if self._effect == EFFECT_NIGHT:
|
if self._effect == EFFECT_NIGHT:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
if self._color is None or self._color[1] == 0:
|
||||||
|
return None
|
||||||
|
|
||||||
return self._color
|
return self._color
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user