Skip to content

Commit

Permalink
Replace async_write_ha_stat with schedule_update_ha_state
Browse files Browse the repository at this point in the history
  • Loading branch information
szibis committed May 20, 2024
1 parent 668a45f commit 5fe81ee
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 @@ -192,7 +192,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 @@ -204,4 +204,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 5fe81ee

Please sign in to comment.