Add support for importing integrations in the executor (#111336)
* Add support for pre-imports at setup time alternative solution to #111331 * refactor * refactor * refactor * mark >1.0s integrations * no point in executor if already loaded * no point in executor if already loaded * cleanup * cleanup * two more * one more * analytics loads a lot more integrations * cloud * debug * psutil, hardwre * try zha * Update homeassistant/setup.py * await * comments * coverage * coverage * coverage * move logic to loader * move logic to loader * preserve comments
This commit is contained in:
parent
75e59167de
commit
4ea1c5cc3c
25 changed files with 278 additions and 9 deletions
|
@ -476,7 +476,7 @@ class ConfigEntry:
|
|||
|
||||
if domain_is_integration:
|
||||
try:
|
||||
integration.get_platform("config_flow")
|
||||
await integration.async_get_platform("config_flow")
|
||||
except ImportError as err:
|
||||
_LOGGER.error(
|
||||
(
|
||||
|
@ -2427,9 +2427,8 @@ async def _load_integration(
|
|||
|
||||
# Make sure requirements and dependencies of component are resolved
|
||||
await async_process_deps_reqs(hass, hass_config, integration)
|
||||
|
||||
try:
|
||||
integration.get_platform("config_flow")
|
||||
await integration.async_get_platform("config_flow")
|
||||
except ImportError as err:
|
||||
_LOGGER.error(
|
||||
"Error occurred loading flow for integration %s: %s",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue