From dea2bc86ce7f2f9b25cf23472f95dce69752ccd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ma=C5=82olepszy?= Date: Thu, 26 Jun 2025 01:04:02 +0200 Subject: [PATCH] Fix unit of measure warning for washing mashine current electricity usage --- custom_components/hon/sensor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/hon/sensor.py b/custom_components/hon/sensor.py index f69f9ce..852896e 100644 --- a/custom_components/hon/sensor.py +++ b/custom_components/hon/sensor.py @@ -16,6 +16,7 @@ from homeassistant.const import ( from homeassistant.const import ( REVOLUTIONS_PER_MINUTE, UnitOfEnergy, + UnitOfPower, UnitOfVolume, UnitOfMass, UnitOfTime, @@ -83,7 +84,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", translation_key="energy_current", ),