aboutsummaryrefslogtreecommitdiff
path: root/ui/js/api.js
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-04-08 11:34:28 +0200
committerlonkaars <loek@pipeframe.xyz>2024-04-08 11:34:28 +0200
commitdcdb47f24057f42b600856064ab2e45ac252f9dd (patch)
treed39f8e4f7c768fc6b94a7a7945965eba8e322be4 /ui/js/api.js
parent8d2f3af3d5b88ac5b7186b23c4231d9cf00f3616 (diff)
fix light value range + send allState message on socket connect
Diffstat (limited to 'ui/js/api.js')
-rw-r--r--ui/js/api.js3
1 files changed, 2 insertions, 1 deletions
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 => {