From 97ebe59584b70c95d2aaf002607a0424239dffac Mon Sep 17 00:00:00 2001 From: Guido Schmitz Date: Thu, 10 Nov 2022 19:33:10 +0100 Subject: [PATCH] Use UnitOfTemperature in devolo Home Control (#81923) --- homeassistant/components/devolo_home_control/climate.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/devolo_home_control/climate.py b/homeassistant/components/devolo_home_control/climate.py index 6c566aa45e3..227b4796883 100644 --- a/homeassistant/components/devolo_home_control/climate.py +++ b/homeassistant/components/devolo_home_control/climate.py @@ -8,13 +8,12 @@ from devolo_home_control_api.homecontrol import HomeControl from homeassistant.components.climate import ( ATTR_TEMPERATURE, - TEMP_CELSIUS, ClimateEntity, ClimateEntityFeature, HVACMode, ) from homeassistant.config_entries import ConfigEntry -from homeassistant.const import PRECISION_HALVES, PRECISION_TENTHS +from homeassistant.const import PRECISION_HALVES, PRECISION_TENTHS, UnitOfTemperature from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback @@ -68,7 +67,7 @@ class DevoloClimateDeviceEntity(DevoloMultiLevelSwitchDeviceEntity, ClimateEntit self._attr_precision = PRECISION_TENTHS self._attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE self._attr_target_temperature_step = PRECISION_HALVES - self._attr_temperature_unit = TEMP_CELSIUS + self._attr_temperature_unit = UnitOfTemperature.CELSIUS @property def current_temperature(self) -> float | None: