From dcdb47f24057f42b600856064ab2e45ac252f9dd Mon Sep 17 00:00:00 2001 From: lonkaars Date: Mon, 8 Apr 2024 11:34:28 +0200 Subject: fix light value range + send allState message on socket connect --- ui/js/api.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ui/js/api.js') diff --git a/ui/js/api.js b/ui/js/api.js index 3a08c8d..7f11c17 100644 --- a/ui/js/api.js +++ b/ui/js/api.js @@ -50,6 +50,7 @@ const api = { }, msg: { send: { + allState: () => send({ type: 'allState' }), helloWorld: () => send({ type: 'helloWorld' }), barrier: el => { var open = el.value == "true"; // string to boolean @@ -63,7 +64,7 @@ const api = { }, lights: el => { var value = Number(el.value); - send({ type: 'lights', value }); + send({ type: 'lights', value: value / 10 }); api.update.lights(value); }, matrix: el => { -- cgit v1.2.3