Use new device class in homematic (#83303)
parent
42c6920a91
commit
b75eb71764
|
@ -20,14 +20,14 @@ from homeassistant.const import (
|
|||
ENERGY_KILO_WATT_HOUR,
|
||||
ENERGY_WATT_HOUR,
|
||||
FREQUENCY_HERTZ,
|
||||
LENGTH_MILLIMETERS,
|
||||
LIGHT_LUX,
|
||||
PERCENTAGE,
|
||||
POWER_WATT,
|
||||
PRESSURE_HPA,
|
||||
SPEED_KILOMETERS_PER_HOUR,
|
||||
TEMP_CELSIUS,
|
||||
VOLUME_CUBIC_METERS,
|
||||
UnitOfPrecipitationDepth,
|
||||
UnitOfSpeed,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
@ -166,12 +166,13 @@ SENSOR_DESCRIPTIONS: dict[str, SensorEntityDescription] = {
|
|||
),
|
||||
"RAIN_COUNTER": SensorEntityDescription(
|
||||
key="RAIN_COUNTER",
|
||||
native_unit_of_measurement=LENGTH_MILLIMETERS,
|
||||
native_unit_of_measurement=UnitOfPrecipitationDepth.MILLIMETERS,
|
||||
device_class=SensorDeviceClass.PRECIPITATION,
|
||||
),
|
||||
"WIND_SPEED": SensorEntityDescription(
|
||||
key="WIND_SPEED",
|
||||
native_unit_of_measurement=SPEED_KILOMETERS_PER_HOUR,
|
||||
device_class=SensorDeviceClass.SPEED,
|
||||
native_unit_of_measurement=UnitOfSpeed.KILOMETERS_PER_HOUR,
|
||||
device_class=SensorDeviceClass.WIND_SPEED,
|
||||
icon="mdi:weather-windy",
|
||||
),
|
||||
"WIND_DIRECTION": SensorEntityDescription(
|
||||
|
|
Loading…
Reference in New Issue