Use new enums in rflink (#83371)
This commit is contained in:
parent
d1bbd241aa
commit
3de7b439b8
1 changed files with 8 additions and 8 deletions
|
@ -20,14 +20,14 @@ from homeassistant.const import (
|
||||||
CONF_SENSOR_TYPE,
|
CONF_SENSOR_TYPE,
|
||||||
CONF_UNIT_OF_MEASUREMENT,
|
CONF_UNIT_OF_MEASUREMENT,
|
||||||
DEGREE,
|
DEGREE,
|
||||||
ELECTRIC_CURRENT_AMPERE,
|
|
||||||
ELECTRIC_POTENTIAL_VOLT,
|
|
||||||
LIGHT_LUX,
|
LIGHT_LUX,
|
||||||
PERCENTAGE,
|
PERCENTAGE,
|
||||||
PRECIPITATION_MILLIMETERS,
|
|
||||||
UV_INDEX,
|
UV_INDEX,
|
||||||
|
UnitOfElectricCurrent,
|
||||||
|
UnitOfElectricPotential,
|
||||||
UnitOfLength,
|
UnitOfLength,
|
||||||
UnitOfPower,
|
UnitOfPower,
|
||||||
|
UnitOfPrecipitationDepth,
|
||||||
UnitOfPressure,
|
UnitOfPressure,
|
||||||
UnitOfSpeed,
|
UnitOfSpeed,
|
||||||
UnitOfTemperature,
|
UnitOfTemperature,
|
||||||
|
@ -91,21 +91,21 @@ SENSOR_TYPES = (
|
||||||
name="Current phase 1",
|
name="Current phase 1",
|
||||||
device_class=SensorDeviceClass.CURRENT,
|
device_class=SensorDeviceClass.CURRENT,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE,
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="current_phase_2",
|
key="current_phase_2",
|
||||||
name="Current phase 2",
|
name="Current phase 2",
|
||||||
device_class=SensorDeviceClass.CURRENT,
|
device_class=SensorDeviceClass.CURRENT,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE,
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="current_phase_3",
|
key="current_phase_3",
|
||||||
name="Current phase 3",
|
name="Current phase 3",
|
||||||
device_class=SensorDeviceClass.CURRENT,
|
device_class=SensorDeviceClass.CURRENT,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE,
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="distance",
|
key="distance",
|
||||||
|
@ -189,7 +189,7 @@ SENSOR_TYPES = (
|
||||||
name="Total rain",
|
name="Total rain",
|
||||||
device_class=SensorDeviceClass.PRECIPITATION,
|
device_class=SensorDeviceClass.PRECIPITATION,
|
||||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||||
native_unit_of_measurement=PRECIPITATION_MILLIMETERS,
|
native_unit_of_measurement=UnitOfPrecipitationDepth.MILLIMETERS,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="uv_intensity",
|
key="uv_intensity",
|
||||||
|
@ -208,7 +208,7 @@ SENSOR_TYPES = (
|
||||||
name="Voltage",
|
name="Voltage",
|
||||||
device_class=SensorDeviceClass.VOLTAGE,
|
device_class=SensorDeviceClass.VOLTAGE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
native_unit_of_measurement=ELECTRIC_POTENTIAL_VOLT,
|
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="watt",
|
key="watt",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue