Small speed up to starting and stopping cloud (#114696)

This commit is contained in:
J. Nick Koston 2024-04-02 17:47:22 -10:00 committed by GitHub
parent 06a752aa92
commit d17f308c6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -262,7 +262,9 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Shutdown event."""
await cloud.stop()
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, _shutdown)
hass.bus.async_listen_once(
EVENT_HOMEASSISTANT_STOP, _shutdown, run_immediately=True
)
_remote_handle_prefs_updated(cloud)
@ -343,7 +345,8 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
DOMAIN,
{"platform_loaded": tts_platform_loaded},
config,
)
),
eager_start=True,
)
async_call_later(