Skip to content

Commit

Permalink
Change async_write_ha_state to schedule_update_ha_state to fix #37
Browse files Browse the repository at this point in the history
Change async_write_ha_state to schedule_update_ha_state to fix #37
  • Loading branch information
erlendsellie committed May 1, 2024
1 parent c7fff66 commit 9df0239
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/priceanalyzer/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def _update(self, data) -> None:
self._data.update(data)

def update_sensor(self):
self.async_write_ha_state()
self.schedule_update_ha_state()

async def async_added_to_hass(self):
"""Connect to dispatcher listening for entity data notifications."""
Expand Down Expand Up @@ -346,7 +346,7 @@ def _update(self, data) -> None:
self._data.update(data)

def update_sensor(self):
self.async_write_ha_state()
self.schedule_update_ha_state()

async def async_added_to_hass(self):
"""Connect to dispatcher listening for entity data notifications."""
Expand Down Expand Up @@ -418,7 +418,7 @@ def _update(self, data) -> None:
self._data.update(data)

def update_sensor(self):
self.async_write_ha_state()
self.schedule_update_ha_state()

async def async_added_to_hass(self):
"""Connect to dispatcher listening for entity data notifications."""
Expand Down

0 comments on commit 9df0239

Please sign in to comment.