Skip to content

Commit

Permalink
there's no native_value property in 2021.8; only came about in 2021.9
Browse files Browse the repository at this point in the history
  • Loading branch information
jyavenard committed Sep 2, 2021
1 parent 5c627ff commit 72c779f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/iotawatt/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())

Expand Down

0 comments on commit 72c779f

Please sign in to comment.