From 68838a72c8d95505a3a177d89a3ba396a1453a2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Poczkodi?= Date: Sat, 9 Nov 2024 04:18:40 +0100 Subject: [PATCH] load_yaml cannot resolve !extend, switching to the full CORE.config --- esphome/components/store_yaml/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/esphome/components/store_yaml/__init__.py b/esphome/components/store_yaml/__init__.py index bc73db77ea..52b833a2a8 100644 --- a/esphome/components/store_yaml/__init__.py +++ b/esphome/components/store_yaml/__init__.py @@ -1,7 +1,9 @@ +import copy import esphome.codegen as cg import esphome.config_validation as cv from esphome import automation, yaml_util from esphome.core import CORE +from esphome.config import strip_default_ids from esphome.const import ( CONF_ID, @@ -27,7 +29,7 @@ async def to_code(config): var = cg.new_Pvariable(config[CONF_ID]) store_yaml = await cg.register_component(var, config) cg.add(store_yaml.set_show_in_dump_config(config[CONF_SHOW_IN_DUMP_CONFIG])) - yaml = yaml_util.load_yaml(CORE.config_path) + yaml = strip_default_ids(copy.deepcopy(CORE.config)) dump = yaml_util.dump(yaml, show_secrets=config[CONF_SHOW_SECRETS]) cg.add(store_yaml.set_yaml(dump))