Correct Hue mireds for lights (#33597)
This commit is contained in:
parent
feed139ae7
commit
0a3ec6fea1
2 changed files with 44 additions and 36 deletions
|
@ -278,6 +278,22 @@ class HueLight(Light):
|
|||
return self.light.action.get("ct")
|
||||
return self.light.state.get("ct")
|
||||
|
||||
@property
|
||||
def min_mireds(self):
|
||||
"""Return the coldest color_temp that this light supports."""
|
||||
if self.is_group:
|
||||
return super().min_mireds
|
||||
|
||||
return self.light.controlcapabilities["ct"]["min"]
|
||||
|
||||
@property
|
||||
def max_mireds(self):
|
||||
"""Return the warmest color_temp that this light supports."""
|
||||
if self.is_group:
|
||||
return super().min_mireds
|
||||
|
||||
return self.light.controlcapabilities["ct"]["max"]
|
||||
|
||||
@property
|
||||
def is_on(self):
|
||||
"""Return true if device is on."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue