Skip to content

Commit

Permalink
Merge pull request #59 from szibis/ss/async_schedule_update
Browse files Browse the repository at this point in the history
Replace async_write_ha_stat with schedule_update_ha_state
  • Loading branch information
michaelarnauts authored May 20, 2024
2 parents dcb3b81 + 5fe81ee commit 467648e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/comfoconnect/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def _handle_update(self, value):
)

self._attr_current_option = self.entity_description.sensor_value_fn(value)
self.async_write_ha_state()
self.schedule_update_ha_state()

async def async_update(self) -> None:
"""Update the state."""
Expand All @@ -226,4 +226,4 @@ async def async_select_option(self, option: str) -> None:
"""Set the selected option."""
await self.entity_description.set_value_fn(self._ccb, option)
self._attr_current_option = option
self.async_write_ha_state()
self.schedule_update_ha_state()

0 comments on commit 467648e

Please sign in to comment.