Tests in the afternoon where OK .
It working in shadow mode and if there are no problems tomorrow then it can take over the job.
Code: Select all
return {
on = {
devices = {
Dev = "Lichtsensor " .. "Binnen"
},
},
execute = function(domoticz, Dev )
local Doel = domoticz.devices('Kamer Schoorsteen Links') -- nog wijzingen in 'Kamer Keukenzijde'
if (Dev.state == 'Off') then
Doel.cancelQueuedCommands()
Doel.switchOff().afterMin(4)
elseif (Dev.state == 'On') then
Doel.cancelQueuedCommands()
Doel.switchOn().afterMin(1)
end
end
}
Therefore is the delay putting in. The old delay had to be cancelled to start the new one.