Use UnitOfElectricCurrent in integrations (#83622)
This commit is contained in:
parent
cc132bfad6
commit
7c3ca38eb7
25 changed files with 80 additions and 82 deletions
|
@ -8,9 +8,9 @@ from homeassistant.components.sensor import (
|
|||
SensorStateClass,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
ELECTRIC_CURRENT_AMPERE,
|
||||
ENERGY_KILO_WATT_HOUR,
|
||||
POWER_KILO_WATT,
|
||||
UnitOfElectricCurrent,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
@ -38,7 +38,7 @@ async def async_setup_platform(
|
|||
SensorEntityDescription(
|
||||
key="Curr user",
|
||||
name="Max Current",
|
||||
native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE,
|
||||
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
||||
device_class=SensorDeviceClass.CURRENT,
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue