Use UnitOfEnergy in integrations (a-n) (#84220)
This commit is contained in:
parent
ebdf9a8658
commit
0dd20fb309
29 changed files with 191 additions and 202 deletions
|
@ -15,11 +15,11 @@ from homeassistant.components.sensor import (
|
|||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
ENERGY_WATT_HOUR,
|
||||
PERCENTAGE,
|
||||
UnitOfApparentPower,
|
||||
UnitOfElectricCurrent,
|
||||
UnitOfElectricPotential,
|
||||
UnitOfEnergy,
|
||||
UnitOfFrequency,
|
||||
UnitOfPower,
|
||||
)
|
||||
|
@ -82,7 +82,7 @@ ENTITY_DESCRIPTION_KEY_MAP: dict[str, IotaWattSensorEntityDescription] = {
|
|||
),
|
||||
"WattHours": IotaWattSensorEntityDescription(
|
||||
"WattHours",
|
||||
native_unit_of_measurement=ENERGY_WATT_HOUR,
|
||||
native_unit_of_measurement=UnitOfEnergy.WATT_HOUR,
|
||||
state_class=SensorStateClass.TOTAL,
|
||||
device_class=SensorDeviceClass.ENERGY,
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue