mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +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:
@@ -67,7 +67,8 @@ def async_set_domains_to_be_loaded(hass: core.HomeAssistant, domains: set[str])
|
||||
- Properly handle after_dependencies.
|
||||
- Keep track of domains which will load but have not yet finished loading
|
||||
"""
|
||||
hass.data[DATA_SETUP_DONE] = {domain: asyncio.Event() for domain in domains}
|
||||
hass.data.setdefault(DATA_SETUP_DONE, {})
|
||||
hass.data[DATA_SETUP_DONE].update({domain: asyncio.Event() for domain in domains})
|
||||
|
||||
|
||||
def setup_component(hass: core.HomeAssistant, domain: str, config: ConfigType) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user