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
|
@ -16,9 +16,9 @@ from homeassistant.const import (
|
|||
PERCENTAGE,
|
||||
REVOLUTIONS_PER_MINUTE,
|
||||
STATE_UNAVAILABLE,
|
||||
TEMP_CELSIUS,
|
||||
Platform,
|
||||
UnitOfInformation,
|
||||
UnitOfTemperature,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers import entity_registry
|
||||
|
@ -171,7 +171,7 @@ SENSOR_TYPES: tuple[GlancesSensorEntityDescription, ...] = (
|
|||
key="temperature_core",
|
||||
type="sensors",
|
||||
name_suffix="Temperature",
|
||||
native_unit_of_measurement=TEMP_CELSIUS,
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
|
@ -179,7 +179,7 @@ SENSOR_TYPES: tuple[GlancesSensorEntityDescription, ...] = (
|
|||
key="temperature_hdd",
|
||||
type="sensors",
|
||||
name_suffix="Temperature",
|
||||
native_unit_of_measurement=TEMP_CELSIUS,
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue