diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp index 20bcdbd89..a72af85bb 100644 --- a/wled00/cfg.cpp +++ b/wled00/cfg.cpp @@ -220,7 +220,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) { CJSON(macroNl, light_nl["macro"]); JsonObject def = doc[F("def")]; - CJSON(bootPreset, def[F("ps")]); + CJSON(bootPreset, def["ps"]); CJSON(turnOnAtBoot, def["on"]); // true CJSON(briS, def["bri"]); // 128 @@ -593,7 +593,7 @@ void serializeConfig() { light_nl["macro"] = macroNl; JsonObject def = doc.createNestedObject("def"); - def[F("ps")] = bootPreset; + def["ps"] = bootPreset; def["on"] = turnOnAtBoot; def["bri"] = briS; diff --git a/wled00/json.cpp b/wled00/json.cpp index de40f5610..1a546c795 100644 --- a/wled00/json.cpp +++ b/wled00/json.cpp @@ -429,7 +429,7 @@ void serializeState(JsonObject root, bool forPreset, bool includeBri, bool segme if (!forPreset) { if (errorFlag) root[F("error")] = errorFlag; - root[F("ps")] = (currentPreset > 0) ? currentPreset : -1; + root["ps"] = (currentPreset > 0) ? currentPreset : -1; root[F("pl")] = currentPlaylist; usermods.addToJsonState(root);