This commit is contained in:
Dmitry Borisenko
2022-08-15 19:31:01 +02:00
parent 754f9d95f9
commit bb3e59e786
2 changed files with 30 additions and 10 deletions

View File

@@ -511,12 +511,12 @@
topic = topic.substring(topic.lastIndexOf("/") + 1, topic.length);
if (key === topic) {
console.log("[i]", "value " + topic + " updated");
if (devLayout[i].widget == "toggle") {
if (value == "1") devLayout[i].status = 1;
if (value == "0") devLayout[i].status = 0;
} else {
devLayout[i].status = value;
}
//if (devLayout[i].widget == "toggle") {
//if (value == "1") devLayout[i].status = 1;
//if (value == "0") devLayout[i].status = 0;
//} else {
devLayout[i].status = value;
//}
break;
}
}