From 72c779f98c6f975f0e9a43bb0407ac9f7335f704 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Thu, 2 Sep 2021 15:28:26 +1000 Subject: [PATCH] there's no native_value property in 2021.8; only came about in 2021.9 --- custom_components/iotawatt/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/iotawatt/sensor.py b/custom_components/iotawatt/sensor.py index cdb92b7..eaff0b6 100644 --- a/custom_components/iotawatt/sensor.py +++ b/custom_components/iotawatt/sensor.py @@ -265,8 +265,8 @@ async def async_added_to_hass(self): await self.coordinator.request_refresh() @property - def native_value(self) -> entity.StateType: - """Return the state of the sensor.""" + def state(self): + """Return the name of the sensor.""" if func := self.entity_description.value: return func(self._sensor_data.getValue())