Deprecate calling async_listen and async_listen_once with run_immediately (#115169)
This commit is contained in:
parent
5ef42078a3
commit
ca5ed274cb
67 changed files with 126 additions and 243 deletions
|
@ -165,7 +165,7 @@ def handle_subscribe_events(
|
|||
)
|
||||
|
||||
connection.subscriptions[msg["id"]] = hass.bus.async_listen(
|
||||
event_type, forward_events, run_immediately=True
|
||||
event_type, forward_events
|
||||
)
|
||||
|
||||
connection.send_result(msg["id"])
|
||||
|
@ -410,7 +410,6 @@ def handle_subscribe_entities(
|
|||
connection.user,
|
||||
msg["id"],
|
||||
),
|
||||
run_immediately=True,
|
||||
)
|
||||
connection.send_result(msg["id"])
|
||||
|
||||
|
|
|
@ -292,7 +292,7 @@ class WebSocketHandler:
|
|||
self._handle_task = asyncio.current_task()
|
||||
|
||||
unsub_stop = hass.bus.async_listen(
|
||||
EVENT_HOMEASSISTANT_STOP, self._async_handle_hass_stop, run_immediately=True
|
||||
EVENT_HOMEASSISTANT_STOP, self._async_handle_hass_stop
|
||||
)
|
||||
|
||||
writer = wsock._writer # pylint: disable=protected-access
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue