Replace deprecated TEMP_CLESIUS, fix #141

This commit is contained in:
Andre Basche 2024-01-11 00:23:08 +01:00
parent f19c0cfcd2
commit e01017125e

View file

@ -17,7 +17,7 @@ from homeassistant.components.climate.const import (
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ( from homeassistant.const import (
ATTR_TEMPERATURE, ATTR_TEMPERATURE,
TEMP_CELSIUS, UnitOfTemperature,
) )
from homeassistant.core import callback from homeassistant.core import callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
@ -137,7 +137,7 @@ class HonACClimateEntity(HonEntity, ClimateEntity):
) -> None: ) -> None:
super().__init__(hass, entry, device, description) super().__init__(hass, entry, device, description)
self._attr_temperature_unit = TEMP_CELSIUS self._attr_temperature_unit = UnitOfTemperature.CELSIUS
self._set_temperature_bound() self._set_temperature_bound()
self._attr_hvac_modes = [HVACMode.OFF] self._attr_hvac_modes = [HVACMode.OFF]
@ -295,7 +295,7 @@ class HonClimateEntity(HonEntity, ClimateEntity):
) -> None: ) -> None:
super().__init__(hass, entry, device, description) super().__init__(hass, entry, device, description)
self._attr_temperature_unit = TEMP_CELSIUS self._attr_temperature_unit = UnitOfTemperature.CELSIUS
self._set_temperature_bound() self._set_temperature_bound()
self._attr_hvac_modes = [description.mode] self._attr_hvac_modes = [description.mode]