Scroll lamps to 255 as they should be

This commit is contained in:
2024-12-29 00:45:24 +01:00
parent fbffdc40f6
commit 0d295c6361

View File

@@ -11,7 +11,9 @@
}); });
function handleBrightnessChange(lamp: number, brightness: number) { function handleBrightnessChange(lamp: number, brightness: number) {
SetLampBrightness(lamp, brightness); // Brightness is actually 1-255 and not 1-100
// But we want the frontend to show 1-100 as in %
SetLampBrightness(lamp, Math.round(brightness * 2.55));
} }
</script> </script>