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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 73 additions and 63 deletions

View file

@ -17,8 +17,8 @@ from homeassistant.const import (
CONCENTRATION_PARTS_PER_MILLION,
LIGHT_LUX,
PERCENTAGE,
TEMP_CELSIUS,
UnitOfPressure,
UnitOfTemperature,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import CONNECTION_BLUETOOTH
@ -63,7 +63,7 @@ SENSORS_MAPPING_TEMPLATE: dict[str, SensorEntityDescription] = {
"temperature": SensorEntityDescription(
key="temperature",
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=TEMP_CELSIUS,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
name="Temperature",
),
"humidity": SensorEntityDescription(