mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Finish all tasks before setup phase is done (#4606)
This commit is contained in:
@@ -365,6 +365,7 @@ def async_from_config_dict(config: Dict[str, Any],
|
||||
Dynamically loads required components and its dependencies.
|
||||
This method is a coroutine.
|
||||
"""
|
||||
hass.async_track_tasks()
|
||||
setup_lock = hass.data.get('setup_lock')
|
||||
if setup_lock is None:
|
||||
setup_lock = hass.data['setup_lock'] = asyncio.Lock(loop=hass.loop)
|
||||
@@ -427,6 +428,8 @@ def async_from_config_dict(config: Dict[str, Any],
|
||||
|
||||
setup_lock.release()
|
||||
|
||||
yield from hass.async_stop_track_tasks()
|
||||
|
||||
return hass
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user