But sometimes I want to stay watching a movie or and prevent the lights from switching off. I made a dummy switch to override the automatic execution of the scene, but my script is not working, it fails on the if statement but I don't see the error

Code: Select all
return {
on = {
scenes = {
'Test scene'
}
},
execute = function(domoticz, scene)
if domoticz.device.('Niet naar bed').status == 'Off'
then
domoticz.log('Scene ' .. scene.name .. ' was switched off', domoticz.LOG_INFO)
else
domoticz.log('Scene ' .. scene.name .. ' was blocked', domoticz.LOG_INFO)
end
}
Jeroen