Ignore update locallyControlled if configuration from server

This commit is contained in:
Phat Nguyen
2024-03-31 07:52:33 +07:00
parent dc875dd5a8
commit adce439ce7

View File

@ -267,12 +267,15 @@ bool LocalConfig::parse(String data, bool isLocal) {
} }
} }
if (JSON.typeof_(root["locallyControlled"]) == "boolean") { /** This field only allow on local configure */
bool locallyControlled = root["locallyControlled"]; if (isLocal) {
if (locallyControlled != config.locallyControlled) { if (JSON.typeof_(root["locallyControlled"]) == "boolean") {
changed = true; bool locallyControlled = root["locallyControlled"];
config.locallyControlled = locallyControlled; if (locallyControlled != config.locallyControlled) {
printLog("set locallyControlled: " + String(locallyControlled)); changed = true;
config.locallyControlled = locallyControlled;
printLog("set locallyControlled: " + String(locallyControlled));
}
} }
} }