Re: 'General purpose' timers
Posted: Saturday 30 June 2018 15:19
@Andyf66,
I like your idea. I think it could be further simplified to something like:
This moves the new 'event' into the scripting engine and just exposes a callback to a lamba after a specified amount of time.
I like your idea. I think it could be further simplified to something like:
Code: Select all
on = {
devices = {
'Stairs Motion'
}
},
execute = function(dz)
-- Must be the motion sensor...
domoticz.runInMins(5, function(dz)
-- Execute my 5 minute tasks
)
domoticz.runInMins(10, function(dz)
-- Execute my 10 minute tasks
)
end