Moving from lua to dzvents. Just created my first script (see below for full script).
After setting the script to active, my log is flooded with the error below:
Code: Select all
2018-07-31 11:53:50.380 Error: EventSystem: in /home/pi/domoticz/dzVents/runtime/dzVents.lua: ...oticz/dzVents/runtime/device-adapters/youless_device.lua:19: attempt to perform arithmetic on a nil value
Code: Select all
return {
on = {
timer = {'45 minutes after sunset'}
},
execute = function(domoticz)
domoticz.log('Gordijnen beneden sluiten', domoticz.LOG_INFO)
local gordijnenVoorkamer = domoticz.devices("Gordijnen Voorkamer")
local gordijnenAchterkamer = domoticz.devices("Gordijnen Achterkamer")
gordijnenAchterkamer.switchOn().checkFirst().forMin(5)
gordijnenVoorkamer.switchOn().checkFirst().forMin(5)
end
}