From 2517ba59b57ac6ba4d3af2d6a689881ab759f518 Mon Sep 17 00:00:00 2001 From: Robert Hillis Date: Tue, 26 Oct 2021 00:12:21 -0400 Subject: [PATCH] Fix Aurora abb incorrect attr (#58450) --- homeassistant/components/aurora_abb_powerone/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/aurora_abb_powerone/sensor.py b/homeassistant/components/aurora_abb_powerone/sensor.py index bbbd026bb2e..946f5645bdc 100644 --- a/homeassistant/components/aurora_abb_powerone/sensor.py +++ b/homeassistant/components/aurora_abb_powerone/sensor.py @@ -79,7 +79,7 @@ class AuroraSensor(AuroraDevice, SensorEntity): super().__init__(client, data) if typename == "instantaneouspower": self.type = typename - self._attr_unit_of_measurement = POWER_WATT + self._attr_native_unit_of_measurement = POWER_WATT self._attr_device_class = DEVICE_CLASS_POWER elif typename == "temperature": self.type = typename @@ -101,7 +101,7 @@ class AuroraSensor(AuroraDevice, SensorEntity): if self.type == "instantaneouspower": # read ADC channel 3 (grid power output) power_watts = self.client.measure(3, True) - self._attr_state = round(power_watts, 1) + self._attr_native_value = round(power_watts, 1) elif self.type == "temperature": temperature_c = self.client.measure(21) self._attr_native_value = round(temperature_c, 1)