Setup integration dependencies before loading it (#23957)
This commit is contained in:
parent
33ed017851
commit
4a70c725b4
1 changed files with 6 additions and 6 deletions
|
@ -343,12 +343,6 @@ async def check_ha_config_file(hass):
|
|||
result.add_error("Integration not found: {}".format(domain))
|
||||
continue
|
||||
|
||||
try:
|
||||
component = integration.get_component()
|
||||
except ImportError:
|
||||
result.add_error("Component not found: {}".format(domain))
|
||||
continue
|
||||
|
||||
if (not hass.config.skip_pip and integration.requirements and
|
||||
not await requirements.async_process_requirements(
|
||||
hass, integration.domain, integration.requirements)):
|
||||
|
@ -356,6 +350,12 @@ async def check_ha_config_file(hass):
|
|||
', '.join(integration.requirements)))
|
||||
continue
|
||||
|
||||
try:
|
||||
component = integration.get_component()
|
||||
except ImportError:
|
||||
result.add_error("Component not found: {}".format(domain))
|
||||
continue
|
||||
|
||||
if hasattr(component, 'CONFIG_SCHEMA'):
|
||||
try:
|
||||
config = component.CONFIG_SCHEMA(config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue