Fix tplink max/min kelvin for temperature adjustment (#15020)
This commit is contained in:
parent
6bc03ee763
commit
a729742757
3 changed files with 13 additions and 3 deletions
|
@ -19,7 +19,7 @@ from homeassistant.util.color import \
|
|||
from homeassistant.util.color import (
|
||||
color_temperature_kelvin_to_mired as kelvin_to_mired)
|
||||
|
||||
REQUIREMENTS = ['pyHS100==0.3.1']
|
||||
REQUIREMENTS = ['pyHS100==0.3.2']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -104,6 +104,16 @@ class TPLinkSmartBulb(Light):
|
|||
"""Turn the light off."""
|
||||
self.smartbulb.state = self.smartbulb.BULB_STATE_OFF
|
||||
|
||||
@property
|
||||
def min_mireds(self):
|
||||
"""Return minimum supported color temperature."""
|
||||
return kelvin_to_mired(self.smartbulb.valid_temperature_range[1])
|
||||
|
||||
@property
|
||||
def max_mireds(self):
|
||||
"""Return maximum supported color temperature."""
|
||||
return kelvin_to_mired(self.smartbulb.valid_temperature_range[0])
|
||||
|
||||
@property
|
||||
def color_temp(self):
|
||||
"""Return the color temperature of this light in mireds for HA."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue