Use UnitOfTemperature in integrations (i-m) (#84307)

This commit is contained in:
epenet 2022-12-20 18:30:46 +01:00 committed by GitHub
parent 9580c4f1ec
commit a6ddac9004
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 58 additions and 51 deletions

View file

@ -10,7 +10,7 @@ from homeassistant.components.sensor import (
SensorEntity,
SensorEntityDescription,
)
from homeassistant.const import TEMP_CELSIUS, UnitOfPressure
from homeassistant.const import UnitOfPressure, UnitOfTemperature
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
@ -41,14 +41,14 @@ SENSOR_TYPES: tuple[IncomfortSensorEntityDescription, ...] = (
key="heater_temp",
name=INCOMFORT_HEATER_TEMP,
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=TEMP_CELSIUS,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
extra_key="is_pumping",
),
IncomfortSensorEntityDescription(
key="tap_temp",
name=INCOMFORT_TAP_TEMP,
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=TEMP_CELSIUS,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
extra_key="is_tapping",
),
)