From e01017125ee81e2a3c6e363568f028c8b140cef4 Mon Sep 17 00:00:00 2001 From: Andre Basche Date: Thu, 11 Jan 2024 00:23:08 +0100 Subject: [PATCH] Replace deprecated TEMP_CLESIUS, fix #141 --- custom_components/hon/climate.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/hon/climate.py b/custom_components/hon/climate.py index d43b43f..323cb52 100644 --- a/custom_components/hon/climate.py +++ b/custom_components/hon/climate.py @@ -17,7 +17,7 @@ from homeassistant.components.climate.const import ( from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( ATTR_TEMPERATURE, - TEMP_CELSIUS, + UnitOfTemperature, ) from homeassistant.core import callback from homeassistant.helpers.entity_platform import AddEntitiesCallback @@ -137,7 +137,7 @@ class HonACClimateEntity(HonEntity, ClimateEntity): ) -> None: super().__init__(hass, entry, device, description) - self._attr_temperature_unit = TEMP_CELSIUS + self._attr_temperature_unit = UnitOfTemperature.CELSIUS self._set_temperature_bound() self._attr_hvac_modes = [HVACMode.OFF] @@ -295,7 +295,7 @@ class HonClimateEntity(HonEntity, ClimateEntity): ) -> None: super().__init__(hass, entry, device, description) - self._attr_temperature_unit = TEMP_CELSIUS + self._attr_temperature_unit = UnitOfTemperature.CELSIUS self._set_temperature_bound() self._attr_hvac_modes = [description.mode]