switchOff after restart Domoticz
Posted: Friday 04 May 2018 19:47
I wrote a script so that after restarting domoticz some switches are turned off, but it works. tell me what is wrong
Code: Select all
return {
active = true,
on = {
timer = {'every minute'}
},
logging = {
level = domoticz.LOG_ERROR
},
execute = function(dz)
local Switches = domoticz.devices().filter({2,39})
Switches.forEach(function(Switch)
if (domoticz.systemUptime < 10) then
Switches.switchOff().checkFirst()
end
end)
end
}