diff --git a/esphome/components/store_yaml/__init__.py b/esphome/components/store_yaml/__init__.py index 731c23e43a..e2bbbfe411 100644 --- a/esphome/components/store_yaml/__init__.py +++ b/esphome/components/store_yaml/__init__.py @@ -24,8 +24,14 @@ platforms = [ ] CODEOWNERS = ["@gabest11"] -if CORE.target_platform in platforms: - AUTO_LOAD = ["web_server_base"] + + +def AUTO_LOAD(): + if CORE.target_platform in platforms: + return ["web_server_base"] + return [] + + CONF_SHOW_IN_DUMP_CONFIG = "show_in_dump_config" CONF_SHOW_SECRETS = "show_secrets" CONF_HTTP = "http" diff --git a/esphome/components/store_yaml/store_yaml.cpp b/esphome/components/store_yaml/store_yaml.cpp index 3ffc4538d3..d1f9502bf2 100644 --- a/esphome/components/store_yaml/store_yaml.cpp +++ b/esphome/components/store_yaml/store_yaml.cpp @@ -8,13 +8,13 @@ namespace store_yaml { static const char *const TAG = "store_yaml"; void StoreYamlComponent::dump_config() { - if (this->show_in_dump_config_) { - ESP_LOGCONFIG(TAG, "YAML:"); - ESP_LOGCONFIG(TAG, " Compressed size: %zu", ESPHOME_YAML_SIZE); + ESP_LOGCONFIG(TAG, "YAML:"); + ESP_LOGCONFIG(TAG, " Compressed size: %zu", ESPHOME_YAML_SIZE); #ifndef USE_RP2040 - const char *url = (this->web_server_ != nullptr) ? this->web_server_url_.c_str() : "not configured!"; - ESP_LOGCONFIG(TAG, " Web server url: %s", url); + const char *url = (this->web_server_ != nullptr) ? this->web_server_url_.c_str() : "not configured!"; + ESP_LOGCONFIG(TAG, " Web server url: %s", url); #endif + if (this->show_in_dump_config_) { RowDecompressor dec(ESPHOME_YAML, ESPHOME_YAML_SIZE); std::string row; while (dec.get_row(row)) {