diff --git a/custom_components/hon/binary_sensor.py b/custom_components/hon/binary_sensor.py index ffc7aa9..c54d917 100644 --- a/custom_components/hon/binary_sensor.py +++ b/custom_components/hon/binary_sensor.py @@ -346,4 +346,4 @@ class HonBinarySensorEntity(HonEntity, BinarySensorEntity): == self.entity_description.on_value ) if update: - self.async_write_ha_state() + self.schedule_update_ha_state() diff --git a/custom_components/hon/climate.py b/custom_components/hon/climate.py index 3a88153..81774c2 100644 --- a/custom_components/hon/climate.py +++ b/custom_components/hon/climate.py @@ -290,7 +290,7 @@ class HonACClimateEntity(HonEntity, ClimateEntity): @callback def _handle_coordinator_update(self, update: bool = True) -> None: if update: - self.async_write_ha_state() + self.schedule_update_ha_state() class HonClimateEntity(HonEntity, ClimateEntity): @@ -423,4 +423,4 @@ class HonClimateEntity(HonEntity, ClimateEntity): @callback def _handle_coordinator_update(self, update: bool = True) -> None: if update: - self.async_write_ha_state() + self.schedule_update_ha_state() diff --git a/custom_components/hon/entity.py b/custom_components/hon/entity.py index 0d0b2d4..cc1c92f 100644 --- a/custom_components/hon/entity.py +++ b/custom_components/hon/entity.py @@ -53,4 +53,4 @@ class HonEntity(CoordinatorEntity[DataUpdateCoordinator[dict[str, Any]]]): @callback def _handle_coordinator_update(self, update: bool = True) -> None: if update: - self.async_write_ha_state() + self.schedule_update_ha_state() diff --git a/custom_components/hon/fan.py b/custom_components/hon/fan.py index 0eb47aa..ae07b4b 100644 --- a/custom_components/hon/fan.py +++ b/custom_components/hon/fan.py @@ -125,7 +125,7 @@ class HonFanEntity(HonEntity, FanEntity): ) self._attr_percentage = self.percentage if update: - self.async_write_ha_state() + self.schedule_update_ha_state() @property def available(self) -> bool: diff --git a/custom_components/hon/light.py b/custom_components/hon/light.py index 307c47d..63160bc 100644 --- a/custom_components/hon/light.py +++ b/custom_components/hon/light.py @@ -136,7 +136,7 @@ class HonLightEntity(HonEntity, LightEntity): self._attr_is_on = self.is_on self._attr_brightness = self.brightness if update: - self.async_write_ha_state() + self.schedule_update_ha_state() @property def available(self) -> bool: diff --git a/custom_components/hon/lock.py b/custom_components/hon/lock.py index 42ad780..f4881a8 100644 --- a/custom_components/hon/lock.py +++ b/custom_components/hon/lock.py @@ -83,4 +83,4 @@ class HonLockEntity(HonEntity, LockEntity): def _handle_coordinator_update(self, update: bool = True) -> None: self._attr_is_locked = self.is_locked if update: - self.async_write_ha_state() + self.schedule_update_ha_state() diff --git a/custom_components/hon/number.py b/custom_components/hon/number.py index 5e81d26..bc5eccb 100644 --- a/custom_components/hon/number.py +++ b/custom_components/hon/number.py @@ -268,7 +268,7 @@ class HonNumberEntity(HonEntity, NumberEntity): self._attr_native_step = setting.step self._attr_native_value = self.native_value if update: - self.async_write_ha_state() + self.schedule_update_ha_state() @property def available(self) -> bool: @@ -324,4 +324,4 @@ class HonConfigNumberEntity(HonEntity, NumberEntity): self._attr_native_step = setting.step self._attr_native_value = self.native_value if update: - self.async_write_ha_state() + self.schedule_update_ha_state() diff --git a/custom_components/hon/select.py b/custom_components/hon/select.py index b7421cd..4506549 100644 --- a/custom_components/hon/select.py +++ b/custom_components/hon/select.py @@ -271,7 +271,7 @@ class HonConfigSelectEntity(HonEntity, SelectEntity): self._attr_options = self.options self._attr_current_option = self.current_option if update: - self.async_write_ha_state() + self.schedule_update_ha_state() @property def available(self) -> bool: @@ -334,4 +334,4 @@ class HonSelectEntity(HonEntity, SelectEntity): self._attr_options = self.options self._attr_current_option = self.current_option if update: - self.async_write_ha_state() + self.schedule_update_ha_state() diff --git a/custom_components/hon/sensor.py b/custom_components/hon/sensor.py index 24068bc..f69f9ce 100644 --- a/custom_components/hon/sensor.py +++ b/custom_components/hon/sensor.py @@ -846,7 +846,7 @@ class HonSensorEntity(HonEntity, SensorEntity): self._attr_native_value = 0 self._attr_native_value = value if update: - self.async_write_ha_state() + self.schedule_update_ha_state() class HonConfigSensorEntity(HonEntity, SensorEntity): @@ -874,4 +874,4 @@ class HonConfigSensorEntity(HonEntity, SensorEntity): value = get_readable(self.entity_description, value) self._attr_native_value = value if update: - self.async_write_ha_state() + self.schedule_update_ha_state() diff --git a/custom_components/hon/switch.py b/custom_components/hon/switch.py index 381b9eb..5edf30e 100644 --- a/custom_components/hon/switch.py +++ b/custom_components/hon/switch.py @@ -476,7 +476,7 @@ class HonSwitchEntity(HonEntity, SwitchEntity): def _handle_coordinator_update(self, update: bool = True) -> None: self._attr_is_on = self.is_on if update: - self.async_write_ha_state() + self.schedule_update_ha_state() class HonControlSwitchEntity(HonEntity, SwitchEntity): @@ -556,4 +556,4 @@ class HonConfigSwitchEntity(HonEntity, SwitchEntity): def _handle_coordinator_update(self, update: bool = True) -> None: self._attr_is_on = self.is_on if update: - self.async_write_ha_state() + self.schedule_update_ha_state()