From 5fe81ee491d694ceecba74666b6952665ac92f41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20Skowron?= Date: Mon, 20 May 2024 11:13:32 +0200 Subject: [PATCH] Replace async_write_ha_stat with schedule_update_ha_state --- custom_components/comfoconnect/select.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/comfoconnect/select.py b/custom_components/comfoconnect/select.py index d44bc61..99f193d 100644 --- a/custom_components/comfoconnect/select.py +++ b/custom_components/comfoconnect/select.py @@ -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.""" @@ -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()