From 6bd8cf00729aff12978e97115182acfbc66db54d Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 3 Nov 2022 08:27:46 +0100 Subject: [PATCH] Use 'kWh' as unit for 'IEC_ENERGY_COUNTER' (#81427) The standard unit for the 'IEC_ENERGY_COUNTER' type is 'kWh' instead of 'Wh' --- homeassistant/components/homematic/sensor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/homematic/sensor.py b/homeassistant/components/homematic/sensor.py index c7a78c7bbcf..806d56b2c1d 100644 --- a/homeassistant/components/homematic/sensor.py +++ b/homeassistant/components/homematic/sensor.py @@ -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, ),