mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Setup integration dependencies before loading it (#23957)
This commit is contained in:
parent
33ed017851
commit
4a70c725b4
@ -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…
x
Reference in New Issue
Block a user