Use UnitOfTemperature in integrations (p-s) (#84308)

This commit is contained in:
epenet
2022-12-20 18:47:27 +01:00
committed by GitHub
parent d60fe7e7cd
commit ba043c9ebb
24 changed files with 93 additions and 86 deletions

View File

@ -29,9 +29,9 @@ from homeassistant.const import (
PERCENTAGE,
STATE_OFF,
STATE_ON,
TEMP_CELSIUS,
UnitOfDataRate,
UnitOfInformation,
UnitOfTemperature,
)
from homeassistant.core import HomeAssistant, callback
import homeassistant.helpers.config_validation as cv
@ -218,7 +218,7 @@ SENSOR_TYPES: dict[str, SysMonitorSensorEntityDescription] = {
"processor_temperature": SysMonitorSensorEntityDescription(
key="processor_temperature",
name="Processor temperature",
native_unit_of_measurement=TEMP_CELSIUS,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
),