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))
|
result.add_error("Integration not found: {}".format(domain))
|
||||||
continue
|
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
|
if (not hass.config.skip_pip and integration.requirements and
|
||||||
not await requirements.async_process_requirements(
|
not await requirements.async_process_requirements(
|
||||||
hass, integration.domain, integration.requirements)):
|
hass, integration.domain, integration.requirements)):
|
||||||
|
@ -356,6 +350,12 @@ async def check_ha_config_file(hass):
|
||||||
', '.join(integration.requirements)))
|
', '.join(integration.requirements)))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
try:
|
||||||
|
component = integration.get_component()
|
||||||
|
except ImportError:
|
||||||
|
result.add_error("Component not found: {}".format(domain))
|
||||||
|
continue
|
||||||
|
|
||||||
if hasattr(component, 'CONFIG_SCHEMA'):
|
if hasattr(component, 'CONFIG_SCHEMA'):
|
||||||
try:
|
try:
|
||||||
config = component.CONFIG_SCHEMA(config)
|
config = component.CONFIG_SCHEMA(config)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue