Use new enums in rflink (#83371)

This commit is contained in:
epenet
2022-12-06 09:11:53 +01:00
committed by GitHub
parent d1bbd241aa
commit 3de7b439b8

View File

@@ -20,14 +20,14 @@ from homeassistant.const import (
CONF_SENSOR_TYPE,
CONF_UNIT_OF_MEASUREMENT,
DEGREE,
ELECTRIC_CURRENT_AMPERE,
ELECTRIC_POTENTIAL_VOLT,
LIGHT_LUX,
PERCENTAGE,
PRECIPITATION_MILLIMETERS,
UV_INDEX,
UnitOfElectricCurrent,
UnitOfElectricPotential,
UnitOfLength,
UnitOfPower,
UnitOfPrecipitationDepth,
UnitOfPressure,
UnitOfSpeed,
UnitOfTemperature,
@@ -91,21 +91,21 @@ SENSOR_TYPES = (
name="Current phase 1",
device_class=SensorDeviceClass.CURRENT,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE,
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
),
SensorEntityDescription(
key="current_phase_2",
name="Current phase 2",
device_class=SensorDeviceClass.CURRENT,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE,
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
),
SensorEntityDescription(
key="current_phase_3",
name="Current phase 3",
device_class=SensorDeviceClass.CURRENT,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE,
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
),
SensorEntityDescription(
key="distance",
@@ -189,7 +189,7 @@ SENSOR_TYPES = (
name="Total rain",
device_class=SensorDeviceClass.PRECIPITATION,
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=PRECIPITATION_MILLIMETERS,
native_unit_of_measurement=UnitOfPrecipitationDepth.MILLIMETERS,
),
SensorEntityDescription(
key="uv_intensity",
@@ -208,7 +208,7 @@ SENSOR_TYPES = (
name="Voltage",
device_class=SensorDeviceClass.VOLTAGE,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=ELECTRIC_POTENTIAL_VOLT,
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
),
SensorEntityDescription(
key="watt",