Set nest climate min/max temp range (#70960)

This commit is contained in:
Allen Porter 2022-04-27 21:16:50 -07:00 committed by Paulus Schoutsen
parent 8a33eb4418
commit a1f47b2036

View File

@ -71,6 +71,8 @@ FAN_MODE_MAP = {
FAN_INV_MODE_MAP = {v: k for k, v in FAN_MODE_MAP.items()} FAN_INV_MODE_MAP = {v: k for k, v in FAN_MODE_MAP.items()}
MAX_FAN_DURATION = 43200 # 15 hours is the max in the SDM API MAX_FAN_DURATION = 43200 # 15 hours is the max in the SDM API
MIN_TEMP = 10
MAX_TEMP = 32
async def async_setup_sdm_entry( async def async_setup_sdm_entry(
@ -94,6 +96,9 @@ async def async_setup_sdm_entry(
class ThermostatEntity(ClimateEntity): class ThermostatEntity(ClimateEntity):
"""A nest thermostat climate entity.""" """A nest thermostat climate entity."""
_attr_min_temp = MIN_TEMP
_attr_max_temp = MAX_TEMP
def __init__(self, device: Device) -> None: def __init__(self, device: Device) -> None:
"""Initialize ThermostatEntity.""" """Initialize ThermostatEntity."""
self._device = device self._device = device