mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
deCONZ - Add support for max/min mireds (#36355)
* Add support for max/min mireds reported per light from deconz .77 * Bump dependency
This commit is contained in:
parent
391983a0cf
commit
07469127ce
@ -130,6 +130,16 @@ class DeconzLight(DeconzDevice, LightEntity):
|
|||||||
return color_util.color_xy_to_hs(*self._device.xy)
|
return color_util.color_xy_to_hs(*self._device.xy)
|
||||||
return None
|
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
|
@property
|
||||||
def is_on(self):
|
def is_on(self):
|
||||||
"""Return true if light is on."""
|
"""Return true if light is on."""
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "deCONZ",
|
"name": "deCONZ",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/deconz",
|
"documentation": "https://www.home-assistant.io/integrations/deconz",
|
||||||
"requirements": ["pydeconz==70"],
|
"requirements": ["pydeconz==71"],
|
||||||
"ssdp": [
|
"ssdp": [
|
||||||
{
|
{
|
||||||
"manufacturer": "Royal Philips Electronics"
|
"manufacturer": "Royal Philips Electronics"
|
||||||
|
@ -1269,7 +1269,7 @@ pydaikin==2.1.1
|
|||||||
pydanfossair==0.1.0
|
pydanfossair==0.1.0
|
||||||
|
|
||||||
# homeassistant.components.deconz
|
# homeassistant.components.deconz
|
||||||
pydeconz==70
|
pydeconz==71
|
||||||
|
|
||||||
# homeassistant.components.delijn
|
# homeassistant.components.delijn
|
||||||
pydelijn==0.6.0
|
pydelijn==0.6.0
|
||||||
|
@ -545,7 +545,7 @@ pycoolmasternet==0.0.4
|
|||||||
pydaikin==2.1.1
|
pydaikin==2.1.1
|
||||||
|
|
||||||
# homeassistant.components.deconz
|
# homeassistant.components.deconz
|
||||||
pydeconz==70
|
pydeconz==71
|
||||||
|
|
||||||
# homeassistant.components.zwave
|
# homeassistant.components.zwave
|
||||||
pydispatcher==2.0.5
|
pydispatcher==2.0.5
|
||||||
|
@ -46,6 +46,8 @@ LIGHTS = {
|
|||||||
"uniqueid": "00:00:00:00:00:00:00:00-00",
|
"uniqueid": "00:00:00:00:00:00:00:00-00",
|
||||||
},
|
},
|
||||||
"2": {
|
"2": {
|
||||||
|
"ctmax": 454,
|
||||||
|
"ctmin": 155,
|
||||||
"id": "Tunable white light id",
|
"id": "Tunable white light id",
|
||||||
"name": "Tunable white light",
|
"name": "Tunable white light",
|
||||||
"state": {"on": True, "colormode": "ct", "ct": 2500, "reachable": True},
|
"state": {"on": True, "colormode": "ct", "ct": 2500, "reachable": True},
|
||||||
@ -111,6 +113,8 @@ async def test_lights_and_groups(hass):
|
|||||||
tunable_white_light = hass.states.get("light.tunable_white_light")
|
tunable_white_light = hass.states.get("light.tunable_white_light")
|
||||||
assert tunable_white_light.state == "on"
|
assert tunable_white_light.state == "on"
|
||||||
assert tunable_white_light.attributes["color_temp"] == 2500
|
assert tunable_white_light.attributes["color_temp"] == 2500
|
||||||
|
assert tunable_white_light.attributes["max_mireds"] == 454
|
||||||
|
assert tunable_white_light.attributes["min_mireds"] == 155
|
||||||
assert tunable_white_light.attributes["supported_features"] == 2
|
assert tunable_white_light.attributes["supported_features"] == 2
|
||||||
|
|
||||||
on_off_light = hass.states.get("light.on_off_light")
|
on_off_light = hass.states.get("light.on_off_light")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user