Homey.ink on a tablet/desktop

I took the DaneedeKruyff’s code as a starting point.

In the function renderHomey() , “homey.devices.getDevices().then( function (devices)…” disable or comment the line:

"if(!device.ui.quickAction) return false;"

This line will stop adding devices without quickAction property (on/off).

In the renderDevices(devices) function you have to add logic for device without quickaction:

The ‘else’ of the “if (device.ui.quickAction) {. … }”

"$device.classList.toggle('on', true );" so the device looks enabled.

E.g. for a thermometer:

if device.driverId === "thermometer") {
            var $value = document.createElement('div');
            $value.classList.add('value');
            $value.innerHTML = device.capabilitiesObj.measure_temperature.value + device.capabilitiesObj.measure_temperature.units;
            $device.appendChild($value);
        }
1 Like