Fix Livisi climate min/max temperature (#90712)
* Correctly set livisi climate min/max temp * fix importspull/90718/head
parent
45038bac16
commit
bacbe4aa58
|
@ -3,6 +3,8 @@ from __future__ import annotations
|
|||
|
||||
from typing import Any
|
||||
|
||||
from aiolivisi.const import CAPABILITY_CONFIG
|
||||
|
||||
from homeassistant.components.climate import (
|
||||
ClimateEntity,
|
||||
ClimateEntityFeature,
|
||||
|
@ -65,8 +67,6 @@ class LivisiClimate(LivisiEntity, ClimateEntity):
|
|||
_attr_hvac_mode = HVACMode.HEAT
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
_attr_target_temperature_high = MAX_TEMPERATURE
|
||||
_attr_target_temperature_low = MIN_TEMPERATURE
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
@ -83,6 +83,10 @@ class LivisiClimate(LivisiEntity, ClimateEntity):
|
|||
self._temperature_capability = self.capabilities["RoomTemperature"]
|
||||
self._humidity_capability = self.capabilities["RoomHumidity"]
|
||||
|
||||
config = device.get(CAPABILITY_CONFIG, {}).get("RoomSetpoint", {})
|
||||
self._attr_max_temp = config.get("maxTemperature", MAX_TEMPERATURE)
|
||||
self._attr_min_temp = config.get("minTemperature", MIN_TEMPERATURE)
|
||||
|
||||
async def async_set_temperature(self, **kwargs: Any) -> None:
|
||||
"""Set new target temperature."""
|
||||
response = await self.aio_livisi.async_vrcc_set_temperature(
|
||||
|
|
Loading…
Reference in New Issue