mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 02:49:40 +00:00
Ensure dependencies are awaited correctly when setting up integrations (#91454)
* Do not wait * Correct tests * Manage after dependencies stage 1 * test bootstrap dependencies * Assert log the dependenciy is waited for * Improve docstrings * Assert outside callback * Patch async_get_integrations * Revert changes made to snips integration * Undo changes to mqtt_statestream
This commit is contained in:
@@ -629,6 +629,9 @@ async def _async_set_up_integrations(
|
||||
- stage_1_domains
|
||||
)
|
||||
|
||||
# Enables after dependencies when setting up stage 1 domains
|
||||
async_set_domains_to_be_loaded(hass, stage_1_domains)
|
||||
|
||||
# Start setup
|
||||
if stage_1_domains:
|
||||
_LOGGER.info("Setting up stage 1: %s", stage_1_domains)
|
||||
@@ -640,7 +643,7 @@ async def _async_set_up_integrations(
|
||||
except asyncio.TimeoutError:
|
||||
_LOGGER.warning("Setup timed out for stage 1 - moving forward")
|
||||
|
||||
# Enables after dependencies
|
||||
# Add after dependencies when setting up stage 2 domains
|
||||
async_set_domains_to_be_loaded(hass, stage_2_domains)
|
||||
|
||||
if stage_2_domains:
|
||||
|
||||
Reference in New Issue
Block a user