Use UnitOfTemperature in integrations (t-z) (#84309)

This commit is contained in:
epenet 2022-12-20 18:50:39 +01:00 committed by GitHub
parent ba043c9ebb
commit 79d3d4ceae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 59 additions and 64 deletions

View file

@ -13,7 +13,7 @@ from wolf_smartset.models import (
from homeassistant.components.sensor import SensorDeviceClass, SensorEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import TEMP_CELSIUS, UnitOfPressure, UnitOfTime
from homeassistant.const import UnitOfPressure, UnitOfTemperature, UnitOfTime
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.update_coordinator import CoordinatorEntity
@ -114,7 +114,7 @@ class WolfLinkTemperature(WolfLinkSensor):
@property
def native_unit_of_measurement(self):
"""Return the unit the value is expressed in."""
return TEMP_CELSIUS
return UnitOfTemperature.CELSIUS
class WolfLinkPressure(WolfLinkSensor):