Eagerly shutdown homekit_controller at the stop event (#113650)
This commit is contained in:
parent
4d430520a0
commit
309fcb5c30
2 changed files with 8 additions and 3 deletions
|
@ -77,7 +77,9 @@ 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)
|
||||
hass.bus.async_listen_once(
|
||||
EVENT_HOMEASSISTANT_STOP, _async_stop_homekit_controller, run_immediately=True
|
||||
)
|
||||
|
||||
await controller.async_start()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue