Use UnitOfTemperature in integrations (n-o) (#84306)

This commit is contained in:
epenet 2022-12-20 18:39:09 +01:00 committed by GitHub
parent a6ddac9004
commit d60fe7e7cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 72 additions and 80 deletions

View file

@ -6,7 +6,7 @@ from homeassistant.components.sensor import (
SensorStateClass,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import TEMP_CELSIUS
from homeassistant.const import UnitOfTemperature
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
@ -18,7 +18,7 @@ SENSOR_DESCRIPTIONS = (
key=SENSOR_TEMPERATURE,
name="Temperature",
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=TEMP_CELSIUS,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
),
)