This commit is contained in:
@@ -777,8 +777,8 @@ function renderDevices() {
|
||||
if (stateData.status === 'fulfilled') {
|
||||
const checkbox = document.getElementById('dchk-'+i);
|
||||
if (checkbox) {
|
||||
// stateData.value is the response object, not the boolean
|
||||
const actualState = !!stateData.value;
|
||||
// stateData.value is an object {on: false}, need to access the 'on' property
|
||||
const actualState = !!stateData.value.on;
|
||||
checkbox.checked = actualState;
|
||||
console.log(`[DWM] Device ${d.host}:${d.port} - BinaryState: ${actualState ? 'ON' : 'OFF'}, Last brightness: ${brightnessData.value?.brightness || 'N/A'}%`);
|
||||
console.log(`[DWM] Setting checkbox.checked to: ${actualState}`);
|
||||
|
||||
Reference in New Issue
Block a user