Use 'kWh' as unit for 'IEC_ENERGY_COUNTER' (#81427)

The standard unit for the 'IEC_ENERGY_COUNTER' type is 'kWh' instead of 'Wh'
This commit is contained in:
Jan 2022-11-03 08:27:46 +01:00 committed by GitHub
parent 28989754cd
commit 6bd8cf0072
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@ from homeassistant.const import (
DEGREE,
ELECTRIC_CURRENT_MILLIAMPERE,
ELECTRIC_POTENTIAL_VOLT,
ENERGY_KILO_WATT_HOUR,
ENERGY_WATT_HOUR,
FREQUENCY_HERTZ,
LENGTH_MILLIMETERS,
@ -141,7 +142,7 @@ SENSOR_DESCRIPTIONS: dict[str, SensorEntityDescription] = {
),
"IEC_ENERGY_COUNTER": SensorEntityDescription(
key="IEC_ENERGY_COUNTER",
native_unit_of_measurement=ENERGY_WATT_HOUR,
native_unit_of_measurement=ENERGY_KILO_WATT_HOUR,
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.TOTAL_INCREASING,
),