From a6724db01bd1b1ce8f996fafdcb59b15ea7af41d Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Fri, 21 Jun 2024 10:42:25 +0200 Subject: [PATCH] Fix calculation in Refoss (#120069) --- homeassistant/components/refoss/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/refoss/sensor.py b/homeassistant/components/refoss/sensor.py index 3857b401d0d..9f5ee5d898a 100644 --- a/homeassistant/components/refoss/sensor.py +++ b/homeassistant/components/refoss/sensor.py @@ -50,10 +50,10 @@ SENSORS: dict[str, tuple[RefossSensorEntityDescription, ...]] = { translation_key="power", device_class=SensorDeviceClass.POWER, state_class=SensorStateClass.MEASUREMENT, - native_unit_of_measurement=UnitOfPower.KILO_WATT, - suggested_unit_of_measurement=UnitOfPower.WATT, + native_unit_of_measurement=UnitOfPower.WATT, suggested_display_precision=2, subkey="power", + fn=lambda x: x / 1000.0, ), RefossSensorEntityDescription( key="voltage",