Skip to content

refactor: replace schedule_update_ha_state() with async_write_ha_state()#140

Open
jensihnow wants to merge 1 commit into
michaelarnauts:masterfrom
jensihnow:fix/async-write-ha-state
Open

refactor: replace schedule_update_ha_state() with async_write_ha_state()#140
jensihnow wants to merge 1 commit into
michaelarnauts:masterfrom
jensihnow:fix/async-write-ha-state

Conversation

@jensihnow

Copy link
Copy Markdown
Contributor

All push-update callbacks were using schedule_update_ha_state() which internally uses call_soon_threadsafe — designed for scheduling work from outside the event loop. Since these callbacks are invoked by HA's dispatcher from within the event loop, the thread-safe hop is unnecessary.

Relates to #139

All push-update callbacks were using schedule_update_ha_state() which
internally uses call_soon_threadsafe — designed for scheduling work from
outside the event loop. Since these callbacks are invoked by HA's
dispatcher from within the event loop, the thread-safe hop is
unnecessary.

Relates to michaelarnauts#139
@michaelarnauts

Copy link
Copy Markdown
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants