Use UnitOfElectricCurrent in integrations (#83622)

This commit is contained in:
epenet 2022-12-09 10:51:26 +01:00 committed by GitHub
parent cc132bfad6
commit 7c3ca38eb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 80 additions and 82 deletions

View file

@ -12,11 +12,11 @@ from homeassistant.components.sensor import (
)
from homeassistant.const import (
CURRENCY_EURO,
ELECTRIC_CURRENT_AMPERE,
ELECTRIC_POTENTIAL_VOLT,
ENERGY_KILO_WATT_HOUR,
POWER_KILO_WATT,
VOLUME_CUBIC_METERS,
UnitOfElectricCurrent,
)
from homeassistant.util import dt as dt_util
@ -173,7 +173,7 @@ SENSORS: tuple[DSMRReaderSensorEntityDescription, ...] = (
name="Phase power current L1",
entity_registry_enabled_default=False,
device_class=SensorDeviceClass.CURRENT,
native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE,
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
state_class=SensorStateClass.MEASUREMENT,
),
DSMRReaderSensorEntityDescription(
@ -181,7 +181,7 @@ SENSORS: tuple[DSMRReaderSensorEntityDescription, ...] = (
name="Phase power current L2",
entity_registry_enabled_default=False,
device_class=SensorDeviceClass.CURRENT,
native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE,
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
state_class=SensorStateClass.MEASUREMENT,
),
DSMRReaderSensorEntityDescription(
@ -189,7 +189,7 @@ SENSORS: tuple[DSMRReaderSensorEntityDescription, ...] = (
name="Phase power current L3",
entity_registry_enabled_default=False,
device_class=SensorDeviceClass.CURRENT,
native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE,
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
state_class=SensorStateClass.MEASUREMENT,
),
DSMRReaderSensorEntityDescription(