diff --git a/custom_components/comfoconnect/binary_sensor.py b/custom_components/comfoconnect/binary_sensor.py index 93fd87d..ca8723d 100644 --- a/custom_components/comfoconnect/binary_sensor.py +++ b/custom_components/comfoconnect/binary_sensor.py @@ -135,4 +135,4 @@ def _handle_update(self, value): ) self._attr_is_on = True if value else False - self.schedule_update_ha_state() + self.async_write_ha_state() diff --git a/custom_components/comfoconnect/fan.py b/custom_components/comfoconnect/fan.py index c000fcd..2ae2e8d 100644 --- a/custom_components/comfoconnect/fan.py +++ b/custom_components/comfoconnect/fan.py @@ -99,7 +99,7 @@ def _handle_speed_update(self, value: int) -> None: else: self._attr_percentage = ordered_list_item_to_percentage(FAN_SPEEDS, FAN_SPEED_MAPPING[value]) - self.schedule_update_ha_state() + self.async_write_ha_state() def _handle_mode_update(self, value: int) -> None: """Handle update callbacks.""" @@ -109,7 +109,7 @@ def _handle_mode_update(self, value: int) -> None: value, ) self._attr_preset_mode = VentilationMode.AUTO if value == -1 else VentilationMode.MANUAL - self.schedule_update_ha_state() + self.async_write_ha_state() @property def is_on(self) -> bool | None: diff --git a/custom_components/comfoconnect/select.py b/custom_components/comfoconnect/select.py index bcbb1ec..df44bcb 100644 --- a/custom_components/comfoconnect/select.py +++ b/custom_components/comfoconnect/select.py @@ -212,7 +212,7 @@ def _handle_update(self, value): ) self._attr_current_option = self.entity_description.sensor_value_fn(value) - self.schedule_update_ha_state() + self.async_write_ha_state() async def async_update(self) -> None: """Update the state.""" @@ -222,4 +222,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.schedule_update_ha_state() + self.async_write_ha_state() diff --git a/custom_components/comfoconnect/sensor.py b/custom_components/comfoconnect/sensor.py index d108a7a..961d095 100644 --- a/custom_components/comfoconnect/sensor.py +++ b/custom_components/comfoconnect/sensor.py @@ -449,4 +449,4 @@ def _handle_update(self, value): self._attr_native_value = self.entity_description.mapping(value) else: self._attr_native_value = value - self.schedule_update_ha_state() + self.async_write_ha_state()