prevent errorlogs for nonexisting nvs values, version numbering to dev.8d

This commit is contained in:
MichaelDvP
2026-07-12 11:05:28 +02:00
parent 20fc5ede78
commit cb1cb356ce
4 changed files with 11 additions and 5 deletions
+3 -1
View File
@@ -77,7 +77,9 @@ StateUpdateResult WebCustomEntity::update(JsonObject root, WebCustomEntity & web
if (entityItem.ram == 2) { // NVS
char key[sizeof(entityItem.name) + 2];
snprintf(key, sizeof(key), "c:%s", entityItem.name);
EMSESP::nvs_.remove(key);
if (EMSESP::nvs_.isKey(key)) {
EMSESP::nvs_.remove(key);
}
}
if (entityItem.ram) { // save name/value pairs for change checking
doc[entityItem.name] = entityItem.value;