diff options
| author | CircleShift <kgunger12@gmail.com> | 2025-12-20 11:18:55 -0500 |
|---|---|---|
| committer | CircleShift <kgunger12@gmail.com> | 2025-12-20 11:18:55 -0500 |
| commit | 96c8d99ec74acad6f0c99d4d7c006a67ee7d643e (patch) | |
| tree | 19d62b5d7f258afc343ba04ae28720c8fb60a3a1 /scripts/main.js | |
| parent | 04c9c0d1f06ebf4fa2aa234a00838bc198c734e3 (diff) | |
Add debug mode
Diffstat (limited to 'scripts/main.js')
| -rw-r--r-- | scripts/main.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/main.js b/scripts/main.js index e67cff3..bda7798 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -8,8 +8,8 @@ class Client { /** @type {DescAny[]} */ let desc = [ { type: "button", name: "bt", props: {}, }, - { type: "checkbox", name: "cb", props: {}, state: true }, - { type: "toggle", name: "tg", props: {}, state: false }, + { type: "checkbox", name: "cb", props: {}, state: false }, + { type: "toggle", name: "tg", props: {}, state: true }, { type: "slider", name: "sli", props: {max: 10, min: 1, percent: true}, state: 6 }, { type: "color-light", name: "cli", state: 0.7 }, { type: "color-temp", name: "ctp", state: 3000 }, @@ -32,6 +32,9 @@ class Client { { if (e.detail.name == "scb" && e.detail.changed == "value") this.set.widgets["thm"].set(Temperature.from_celcius(e.detail.value)); + + if (e.detail.name == "cb" && e.detail.changed == "value") + WIDGETS_DEBUG = !(!(e.detail.value)) } } |