Install requirements when checking config (#23500)
* Install requirements when checking config * PyLint
This commit is contained in:
parent
84f778d23c
commit
5e3e730496
1 changed files with 8 additions and 1 deletions
|
@ -11,7 +11,7 @@ from unittest.mock import patch
|
|||
import attr
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant import bootstrap, core, loader
|
||||
from homeassistant import bootstrap, core, loader, requirements
|
||||
from homeassistant.config import (
|
||||
get_default_config_dir, CONF_CORE, CORE_CONFIG_SCHEMA,
|
||||
CONF_PACKAGES, merge_packages_config, _format_config_error,
|
||||
|
@ -344,6 +344,13 @@ async def check_ha_config_file(hass):
|
|||
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)):
|
||||
result.add_error("Unable to install all requirements: {}".format(
|
||||
', '.join(integration.requirements)))
|
||||
continue
|
||||
|
||||
if hasattr(component, 'CONFIG_SCHEMA'):
|
||||
try:
|
||||
config = component.CONFIG_SCHEMA(config)
|
||||
|
|
Loading…
Add table
Reference in a new issue