From 097a556e997dc252947f97f60d213ccfa668a323 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 18 Oct 2021 15:41:37 +0200 Subject: [PATCH] Fix ESP32 invalid initial NVM config count --- tasmota/settings.ino | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tasmota/settings.ino b/tasmota/settings.ino index a3b6e1126..a9df2fd4d 100644 --- a/tasmota/settings.ino +++ b/tasmota/settings.ino @@ -685,10 +685,15 @@ void SettingsLoad(void) { } } #endif // ESP8266 + #ifdef ESP32 uint32_t source = SettingsRead(Settings, sizeof(TSettings)); - if (source) { settings_location = 1; } - AddLog(LOG_LEVEL_NONE, PSTR(D_LOG_CONFIG "Loaded from %s, " D_COUNT " %lu"), (source)?"File":"Nvm", Settings->save_flag); + if (source) { + settings_location = 1; + if (Settings->cfg_holder == (uint16_t)CFG_HOLDER) { + AddLog(LOG_LEVEL_NONE, PSTR(D_LOG_CONFIG "Loaded from %s, " D_COUNT " %lu"), (source)?"File":"Nvm", Settings->save_flag); + } + } #endif // ESP32 #ifndef FIRMWARE_MINIMAL