mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 20:40:18 +00:00
Deprecate calling async_listen and async_listen_once with run_immediately (#115169)
This commit is contained in:
@@ -86,9 +86,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
)
|
||||
)
|
||||
|
||||
hass.bus.async_listen_once(
|
||||
EVENT_HOMEASSISTANT_STOP, _async_stop_homekit_controller, run_immediately=True
|
||||
)
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, _async_stop_homekit_controller)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
@@ -286,7 +286,6 @@ class HKDevice:
|
||||
self.hass.bus.async_listen(
|
||||
EVENT_HOMEASSISTANT_STARTED,
|
||||
self._async_populate_ble_accessory_state,
|
||||
run_immediately=True,
|
||||
)
|
||||
)
|
||||
else:
|
||||
|
||||
@@ -77,9 +77,7 @@ async def async_get_controller(hass: HomeAssistant) -> Controller:
|
||||
|
||||
# Right now _async_stop_homekit_controller is only called on HA exiting
|
||||
# So we don't have to worry about leaking a callback here.
|
||||
hass.bus.async_listen_once(
|
||||
EVENT_HOMEASSISTANT_STOP, _async_stop_homekit_controller, run_immediately=True
|
||||
)
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, _async_stop_homekit_controller)
|
||||
|
||||
await controller.async_start()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user