After upgrading from 2025.6.3 to 2025.7.3 on Core (Debian 13, Python 3.13.5) I saw an integration fail to start due to "RuntimeError: no running event loop" in a third-party integration that does something like this (in __init__.py):
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
...
new_auth_response = await hass.async_add_executor_job(
prepare_devices,
manager,
user_input[CONF_USERNAME],
user_input[CONF_PASSWORD],
)
Where the function there prepare_devices() uses aiohttp to make some HTTP requests.
Seems like a race condition where somehow aio isn't yet initialized in the executor thread. It's not happening every time, and reloading the integration after it failed to start got it working.
Is there something that could be done to wait for the event loop to be properly initialized? Isn't this HA's responsibility before running anything via async_add_executor_job? See comment for full stack trace. Integration is https://github.com/iprak/winix but the same error was reported here in ps4: https://github.com/home-assistant/core/issues/145810