Add run_immediately to the trace stop listener (#113922)

This commit is contained in:
J. Nick Koston 2024-03-20 22:32:43 -10:00 committed by GitHub
parent 7758f41c5a
commit 0b0d3a2091
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,7 +68,9 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
_LOGGER.error("Error storing traces", exc_info=exc)
# Store traces when stopping hass
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, _async_store_traces_at_stop)
hass.bus.async_listen_once(
EVENT_HOMEASSISTANT_STOP, _async_store_traces_at_stop, run_immediately=True
)
return True