Switch dispatcher to use async_run_hass_job (#74514)
* Switch dispatcher to use async_run_hass_job - Since we already wrap all the callbacks in catch_log_exception we can use async_run_hass_job here - The overhead of wrapping the call in a call_soon, queuing it and running it later usually exceeds the overhead of running the job itself * fix size change during iteration * fix out of order send * fix missing mocking in unifi test * Fix Legrand Home+ Control updating entities before the coordinator update had finished * stray debug
This commit is contained in:
parent
323d4a0e1b
commit
1dd9e705f2
4 changed files with 48 additions and 17 deletions
|
@ -86,8 +86,8 @@ async def websocket_supervisor_event(
|
|||
hass: HomeAssistant, connection: ActiveConnection, msg: dict
|
||||
):
|
||||
"""Publish events from the Supervisor."""
|
||||
async_dispatcher_send(hass, EVENT_SUPERVISOR_EVENT, msg[ATTR_DATA])
|
||||
connection.send_result(msg[WS_ID])
|
||||
async_dispatcher_send(hass, EVENT_SUPERVISOR_EVENT, msg[ATTR_DATA])
|
||||
|
||||
|
||||
@websocket_api.websocket_command(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue