What do I wrong in this script.
I tried several options but I cant find the correct way.
Thanks in advance.
Peter
Code: Select all
return {
active = true,
on = {
variables =
{ 'situatie' },
timer = {
'every minute'
},
},
execute = function(domoticz, variable)
-- variable is the variable that's triggered
if (variable.value > 0) then
domoticz.devices('Keuken').switchOn()
domoticz.log('Timer event was triggered by ' .. timer.trigger, domoticz.LOG_INFO)
end
end
}
6 situatie Integer 1 2020-07-23 15:39:00
ERROR:
2020-07-23 16:44:00.524 Error: dzVents: Error: (3.0.9) An error occurred when calling event handler 00 var dag nacht
2020-07-23 16:44:00.524 Error: dzVents: Error: (3.0.9) ...r/scripts/dzVents/generated_scripts/00 var dag nacht.lua:15: attempt to compare number with nil