diff --git a/src/App.svelte b/src/App.svelte index c2cd8a0..a3563ca 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -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; } } diff --git a/src/widgets/Toggle.svelte b/src/widgets/Toggle.svelte index 13ab83a..0920af0 100644 --- a/src/widgets/Toggle.svelte +++ b/src/widgets/Toggle.svelte @@ -1,10 +1,30 @@
@@ -15,7 +35,7 @@