Use UnitOfElectricCurrent in integrations (#83622)
This commit is contained in:
parent
cc132bfad6
commit
7c3ca38eb7
25 changed files with 80 additions and 82 deletions
|
@ -14,12 +14,12 @@ from homeassistant.components.sensor import (
|
|||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
ELECTRIC_CURRENT_AMPERE,
|
||||
ELECTRIC_POTENTIAL_VOLT,
|
||||
ENERGY_KILO_WATT_HOUR,
|
||||
FREQUENCY_HERTZ,
|
||||
PERCENTAGE,
|
||||
POWER_KILO_WATT,
|
||||
UnitOfElectricCurrent,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
@ -89,7 +89,7 @@ POWERWALL_INSTANT_SENSORS = (
|
|||
name="Average Current Now",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.CURRENT,
|
||||
native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE,
|
||||
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
||||
entity_registry_enabled_default=False,
|
||||
value_fn=_get_meter_total_current,
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue