mirror of
https://github.com/esphome/esphome.git
synced 2025-02-07 00:11:59 +01:00
load external component to get get_download_types
This commit is contained in:
parent
fc847c1de8
commit
711f320af8
@ -51,7 +51,7 @@ from .util.text import friendly_name_slugify
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from requests import Response
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@ -599,6 +599,19 @@ class DownloadListRequestHandler(BaseHandler):
|
||||
self.send_error(404)
|
||||
return
|
||||
|
||||
config = yaml_util.load_yaml(settings.rel_path(configuration))
|
||||
|
||||
if const.CONF_EXTERNAL_COMPONENTS in config:
|
||||
from esphome.components.external_components import (
|
||||
do_external_components_pass,
|
||||
)
|
||||
|
||||
try:
|
||||
do_external_components_pass(config)
|
||||
except vol.Invalid:
|
||||
self.send_error(404)
|
||||
return
|
||||
|
||||
from esphome.components.esp32 import VARIANTS as ESP32_VARIANTS
|
||||
|
||||
downloads = []
|
||||
|
Loading…
Reference in New Issue
Block a user