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 # 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 from esphome.core import CORE
# pylint: enable=wrong-import-position # pylint: enable=wrong-import-position
CORE.data[KEY_CORE] = {} CORE.data[KEY_CORE] = {KEY_TARGET_PLATFORM: None}
load_components() load_components()
# Import esphome after loading components (so schema is tracked) # 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, []): for k in schema.get(S_EXTENDS, []):
if k not in referenced_schemas: if k not in referenced_schemas:
referenced_schemas[k] = [path] referenced_schemas[k] = [path]
else: elif path not in referenced_schemas[k]:
if path not in referenced_schemas[k]:
referenced_schemas[k].append(path) referenced_schemas[k].append(path)
s1 = get_str_path_schema(k) s1 = get_str_path_schema(k)
@ -868,8 +867,7 @@ def convert(schema, config_var, path):
config_var[S_TYPE] = "use_id" config_var[S_TYPE] = "use_id"
else: else:
print("TODO deferred?") print("TODO deferred?")
else: elif isinstance(data, str):
if isinstance(data, str):
# TODO: Figure out why pipsolar does this # TODO: Figure out why pipsolar does this
config_var["use_id_type"] = data config_var["use_id_type"] = data
else: else: