hOn/custom_components
Vadym Melnychuk 047800ccbf fix(thread-safety): use schedule_update_ha_state in async entity methods
Replace self.async_write_ha_state() with self.schedule_update_ha_state()
in async command handlers across climate, fan, light, lock and switch
entities. HA Core 2026.5.x enforces that async_write_ha_state() is only
called from the event loop, but pyhon-revived delivers MQTT push updates
from another thread, causing 'Detected blocking call'/thread-safety
errors on 2026.5.4.

See https://developers.home-assistant.io/docs/asyncio_thread_safety/#async_write_ha_state
Fixes mmalolepszy/hon-revived#44

Cherry-picked from hon-revived PR #43 (head VadymMelnychuk:async-write-ha-state-fix).
(cherry picked from commit e99a734c2dd07ca216f452a006b1605a1529a710)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 10:49:47 +03:00
..
hon fix(thread-safety): use schedule_update_ha_state in async entity methods 2026-06-12 10:49:47 +03:00