mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 09:47:52 +00:00
Fix deCONZ groups don't report ctmax/min (#36432)
* Groups don't report ctmax/min
This commit is contained in:
parent
68b077ffaa
commit
40829d9d76
@ -82,7 +82,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
async_add_group(gateway.api.groups.values())
|
||||
|
||||
|
||||
class DeconzLight(DeconzDevice, LightEntity):
|
||||
class DeconzBaseLight(DeconzDevice, LightEntity):
|
||||
"""Representation of a deCONZ light."""
|
||||
|
||||
def __init__(self, device, gateway):
|
||||
@ -130,16 +130,6 @@ class DeconzLight(DeconzDevice, LightEntity):
|
||||
return color_util.color_xy_to_hs(*self._device.xy)
|
||||
return None
|
||||
|
||||
@property
|
||||
def max_mireds(self):
|
||||
"""Return the warmest color_temp that this light supports."""
|
||||
return self._device.ctmax or super().max_mireds
|
||||
|
||||
@property
|
||||
def min_mireds(self):
|
||||
"""Return the coldest color_temp that this light supports."""
|
||||
return self._device.ctmin or super().min_mireds
|
||||
|
||||
@property
|
||||
def is_on(self):
|
||||
"""Return true if light is on."""
|
||||
@ -214,7 +204,21 @@ class DeconzLight(DeconzDevice, LightEntity):
|
||||
return attributes
|
||||
|
||||
|
||||
class DeconzGroup(DeconzLight):
|
||||
class DeconzLight(DeconzBaseLight):
|
||||
"""Representation of a deCONZ light."""
|
||||
|
||||
@property
|
||||
def max_mireds(self):
|
||||
"""Return the warmest color_temp that this light supports."""
|
||||
return self._device.ctmax or super().max_mireds
|
||||
|
||||
@property
|
||||
def min_mireds(self):
|
||||
"""Return the coldest color_temp that this light supports."""
|
||||
return self._device.ctmin or super().min_mireds
|
||||
|
||||
|
||||
class DeconzGroup(DeconzBaseLight):
|
||||
"""Representation of a deCONZ group."""
|
||||
|
||||
def __init__(self, device, gateway):
|
||||
|
Loading…
x
Reference in New Issue
Block a user