From 6d2a6ce2e94bca1dda1114e7981aa550c711149a Mon Sep 17 00:00:00 2001 From: Andre Basche Date: Sat, 30 Mar 2024 23:13:19 +0100 Subject: [PATCH] Fix unit of current elecricity #158 --- custom_components/hon/sensor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/custom_components/hon/sensor.py b/custom_components/hon/sensor.py index 9f8bb44..4039282 100644 --- a/custom_components/hon/sensor.py +++ b/custom_components/hon/sensor.py @@ -18,7 +18,6 @@ from homeassistant.const import ( UnitOfEnergy, UnitOfVolume, UnitOfMass, - UnitOfPower, UnitOfTime, UnitOfTemperature, ) @@ -84,7 +83,7 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { name="Current Electricity Used", state_class=SensorStateClass.MEASUREMENT, device_class=SensorDeviceClass.POWER, - native_unit_of_measurement=UnitOfPower.KILO_WATT, + native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, icon="mdi:lightning-bolt", translation_key="energy_current", ),