This commit is contained in:
Tomasz Duda 2024-10-31 18:09:13 +01:00
commit 094b9a7d40

View file

@ -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,8 +394,7 @@ 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]:
elif path not in referenced_schemas[k]:
referenced_schemas[k].append(path)
s1 = get_str_path_schema(k)
@ -868,8 +867,7 @@ def convert(schema, config_var, path):
config_var[S_TYPE] = "use_id"
else:
print("TODO deferred?")
else:
if isinstance(data, str):
elif isinstance(data, str):
# TODO: Figure out why pipsolar does this
config_var["use_id_type"] = data
else: