From e0cba7379aff796f05ca65322eacb82541633c3b Mon Sep 17 00:00:00 2001 From: Andre Basche Date: Thu, 20 Apr 2023 22:07:14 +0200 Subject: [PATCH] Fix wrong unit of current energy usage #30 --- custom_components/hon/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/hon/sensor.py b/custom_components/hon/sensor.py index 32d7aee..af93799 100644 --- a/custom_components/hon/sensor.py +++ b/custom_components/hon/sensor.py @@ -55,7 +55,7 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { name="Current Electricity Used", state_class=SensorStateClass.MEASUREMENT, device_class=SensorDeviceClass.POWER, - native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, + native_unit_of_measurement=UnitOfPower.KILO_WATT, icon="mdi:lightning-bolt", ), SensorEntityDescription( @@ -171,7 +171,7 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { name="Current Electricity Used", state_class=SensorStateClass.MEASUREMENT, device_class=SensorDeviceClass.POWER, - native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, + native_unit_of_measurement=UnitOfPower.KILO_WATT, icon="mdi:lightning-bolt", ), SensorEntityDescription(