Correct Hue mireds for lights (#33597)

This commit is contained in:
Paulus Schoutsen 2020-04-04 14:29:03 -07:00 committed by GitHub
parent feed139ae7
commit 0a3ec6fea1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 44 additions and 36 deletions

View file

@ -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."""