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."""
|
||||
|
|
|
@ -14,7 +14,7 @@ from homeassistant.components.switch import (
|
|||
from homeassistant.const import (CONF_HOST, CONF_NAME, ATTR_VOLTAGE)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
REQUIREMENTS = ['pyHS100==0.3.1']
|
||||
REQUIREMENTS = ['pyHS100==0.3.2']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -715,7 +715,7 @@ pyCEC==0.4.13
|
|||
|
||||
# homeassistant.components.light.tplink
|
||||
# homeassistant.components.switch.tplink
|
||||
pyHS100==0.3.1
|
||||
pyHS100==0.3.2
|
||||
|
||||
# homeassistant.components.rfxtrx
|
||||
pyRFXtrx==0.22.1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue