mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
Run apple_tv shutdown eagerly at the stop event (#113637)
The shutdown can be done without having to schedule a task on the event loop
This commit is contained in:
parent
e703baba0a
commit
44cac3c90a
@ -102,7 +102,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
await manager.disconnect()
|
await manager.disconnect()
|
||||||
|
|
||||||
entry.async_on_unload(
|
entry.async_on_unload(
|
||||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, on_hass_stop)
|
hass.bus.async_listen_once(
|
||||||
|
EVENT_HOMEASSISTANT_STOP, on_hass_stop, run_immediately=True
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user