Skip to content

Commit

Permalink
Merge pull request #28 from jyavenard/0_1_0_fixup
Browse files Browse the repository at this point in the history
there's no native_value property in 2021.8; only came about in 2021.9
  • Loading branch information
gtdiehl authored Sep 2, 2021
2 parents 5c627ff + 72c779f commit 3e2cd10
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 3e2cd10

Please sign in to comment.