Use UnitOfTemperature in integrations (t-z) (#84309)
This commit is contained in:
parent
ba043c9ebb
commit
79d3d4ceae
22 changed files with 59 additions and 64 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue