mirror of
https://github.com/esphome/esphome.git
synced 2024-12-04 13:44:40 +01:00
Merge branch 'dev' into optolink
This commit is contained in:
commit
4a0e5312c9
@ -7,9 +7,10 @@ import requests
|
|||||||
|
|
||||||
import esphome.codegen as cg
|
import esphome.codegen as cg
|
||||||
import esphome.config_validation as cv
|
import esphome.config_validation as cv
|
||||||
|
import esphome.final_validate as fv
|
||||||
from esphome import git
|
from esphome import git
|
||||||
from esphome.components.packages import validate_source_shorthand
|
from esphome.components.packages import validate_source_shorthand
|
||||||
from esphome.const import CONF_REF, CONF_WIFI
|
from esphome.const import CONF_REF, CONF_WIFI, CONF_ESPHOME, CONF_PROJECT
|
||||||
from esphome.wizard import wizard_file
|
from esphome.wizard import wizard_file
|
||||||
from esphome.yaml_util import dump
|
from esphome.yaml_util import dump
|
||||||
|
|
||||||
@ -52,6 +53,17 @@ CONFIG_SCHEMA = cv.All(
|
|||||||
validate_full_url,
|
validate_full_url,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def _final_validate(config):
|
||||||
|
full_config = fv.full_config.get()[CONF_ESPHOME]
|
||||||
|
if CONF_PROJECT not in full_config:
|
||||||
|
raise cv.Invalid(
|
||||||
|
"Dashboard import requires the `esphome` -> `project` information to be provided."
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
FINAL_VALIDATE_SCHEMA = _final_validate
|
||||||
|
|
||||||
WIFI_CONFIG = """
|
WIFI_CONFIG = """
|
||||||
|
|
||||||
wifi:
|
wifi:
|
||||||
|
Loading…
Reference in New Issue
Block a user