diff --git a/src/App.svelte b/src/App.svelte index af5d8b1..b8d1228 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -511,12 +511,7 @@ 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; - //} break; } } @@ -542,6 +537,8 @@ let topic = layoutJson[i].topic; if (topic === newStatusJson.topic) { layoutJson[i].status = newStatusJson.status; + //получен ответ - выключаем красный цвет + layoutJson[i].sent = false; break; } } @@ -1125,7 +1122,7 @@ wsPush(ws, topic, status)} /> -