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
|
@ -15,7 +15,7 @@ from homeassistant.const import (
|
|||
CONF_NAME,
|
||||
CONF_OFFSET,
|
||||
DEVICE_DEFAULT_NAME,
|
||||
TEMP_CELSIUS,
|
||||
UnitOfTemperature,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
@ -74,7 +74,7 @@ class TemperSensor(SensorEntity):
|
|||
"""Representation of a Temper temperature sensor."""
|
||||
|
||||
_attr_device_class = SensorDeviceClass.TEMPERATURE
|
||||
_attr_native_unit_of_measurement = TEMP_CELSIUS
|
||||
_attr_native_unit_of_measurement = UnitOfTemperature.CELSIUS
|
||||
|
||||
def __init__(self, temper_device, name, scaling):
|
||||
"""Initialize the sensor."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue