diff --git a/apps/desktop/resources/web/index.html b/apps/desktop/resources/web/index.html
index 58ce53b..d863024 100644
--- a/apps/desktop/resources/web/index.html
+++ b/apps/desktop/resources/web/index.html
@@ -730,8 +730,10 @@ function renderDevices() {
const checkbox = document.getElementById('dchk-'+i);
if (checkbox) {
// Use the actual binary state, not brightness
- checkbox.checked = !!on;
+ const shouldBeChecked = !!on;
+ checkbox.checked = shouldBeChecked;
console.log(`[DWM] Device ${d.host}:${d.port} - BinaryState: ${on ? 'ON' : 'OFF'}, Last brightness: ${data.brightness}%`);
+ console.log(`[DWM] Setting checkbox.checked to: ${shouldBeChecked}, actual checkbox.checked: ${checkbox.checked}`);
}
})
.catch(() => {});
@@ -740,7 +742,11 @@ function renderDevices() {
api('GET', `/api/devices/${d.host}/${d.port}/state`)
.then((on) => {
const c = document.getElementById('dchk-'+i);
- if (c) c.checked = !!on;
+ if (c) {
+ const shouldBeChecked = !!on;
+ c.checked = shouldBeChecked;
+ console.log(`[DWM] Non-dimmer device ${d.host}:${d.port} - State: ${on ? 'ON' : 'OFF'}, Setting checkbox to: ${shouldBeChecked}`);
+ }
})
.catch(() => {});
}