Use UnitOfElectricCurrent in integrations (#84231)

This commit is contained in:
epenet 2022-12-19 16:59:39 +01:00 committed by GitHub
parent 026f660889
commit 418be1eeb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 17 additions and 17 deletions

View file

@ -17,11 +17,11 @@ from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
CONCENTRATION_PARTS_PER_MILLION,
DEGREE,
ELECTRIC_CURRENT_AMPERE,
LIGHT_LUX,
PERCENTAGE,
SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
TEMP_CELSIUS,
UnitOfElectricCurrent,
UnitOfElectricPotential,
UnitOfEnergy,
UnitOfPower,
@ -89,7 +89,7 @@ SENSORS: Final = {
("emeter", "current"): BlockSensorDescription(
key="emeter|current",
name="Current",
native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE,
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
value=lambda value: value,
device_class=SensorDeviceClass.CURRENT,
state_class=SensorStateClass.MEASUREMENT,