Use UnitOfTemperature in integrations (a-d) (#84304)

This commit is contained in:
epenet
2022-12-20 17:59:20 +01:00
committed by GitHub
parent 82efbee443
commit d89ba40010
24 changed files with 73 additions and 63 deletions

View File

@@ -20,7 +20,7 @@ from homeassistant.const import (
CONF_SHOW_ON_MAP,
CONF_STATE,
PERCENTAGE,
TEMP_CELSIUS,
UnitOfTemperature,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity import EntityCategory
@@ -136,7 +136,7 @@ NODE_PRO_SENSOR_DESCRIPTIONS = (
key=SENSOR_KIND_TEMPERATURE,
name="Temperature",
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=TEMP_CELSIUS,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(