mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 17:27:59 +01:00
fix
This commit is contained in:
commit
094b9a7d40
1 changed files with 9 additions and 11 deletions
|
@ -85,12 +85,12 @@ def load_components():
|
|||
|
||||
|
||||
# pylint: disable=wrong-import-position
|
||||
from esphome.const import CONF_TYPE, KEY_CORE
|
||||
from esphome.const import CONF_TYPE, KEY_CORE, KEY_TARGET_PLATFORM
|
||||
from esphome.core import CORE
|
||||
|
||||
# pylint: enable=wrong-import-position
|
||||
|
||||
CORE.data[KEY_CORE] = {}
|
||||
CORE.data[KEY_CORE] = {KEY_TARGET_PLATFORM: None}
|
||||
load_components()
|
||||
|
||||
# Import esphome after loading components (so schema is tracked)
|
||||
|
@ -394,9 +394,8 @@ def add_referenced_recursive(referenced_schemas, config_var, path, eat_schema=Fa
|
|||
for k in schema.get(S_EXTENDS, []):
|
||||
if k not in referenced_schemas:
|
||||
referenced_schemas[k] = [path]
|
||||
else:
|
||||
if path not in referenced_schemas[k]:
|
||||
referenced_schemas[k].append(path)
|
||||
elif path not in referenced_schemas[k]:
|
||||
referenced_schemas[k].append(path)
|
||||
|
||||
s1 = get_str_path_schema(k)
|
||||
p = k.split(".")
|
||||
|
@ -868,13 +867,12 @@ def convert(schema, config_var, path):
|
|||
config_var[S_TYPE] = "use_id"
|
||||
else:
|
||||
print("TODO deferred?")
|
||||
elif isinstance(data, str):
|
||||
# TODO: Figure out why pipsolar does this
|
||||
config_var["use_id_type"] = data
|
||||
else:
|
||||
if isinstance(data, str):
|
||||
# TODO: Figure out why pipsolar does this
|
||||
config_var["use_id_type"] = data
|
||||
else:
|
||||
config_var["use_id_type"] = str(data.base)
|
||||
config_var[S_TYPE] = "use_id"
|
||||
config_var["use_id_type"] = str(data.base)
|
||||
config_var[S_TYPE] = "use_id"
|
||||
else:
|
||||
raise TypeError("Unknown extracted schema type")
|
||||
elif config_var.get("key") == "GeneratedID":
|
||||
|
|
Loading…
Reference in a new issue