Use UnitOfTemperature in integrations (e-h) (#84305)
This commit is contained in:
parent
d89ba40010
commit
9580c4f1ec
28 changed files with 113 additions and 87 deletions
|
@ -23,7 +23,7 @@ from homeassistant.const import (
|
|||
CONF_TOKEN,
|
||||
CONF_USERNAME,
|
||||
PERCENTAGE,
|
||||
TEMP_CELSIUS,
|
||||
UnitOfTemperature,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.exceptions import PlatformNotReady
|
||||
|
@ -52,7 +52,7 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
|||
SensorEntityDescription(
|
||||
key="tmp",
|
||||
name=ATTR_TEMPERATURE,
|
||||
native_unit_of_measurement=TEMP_CELSIUS,
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue