Hello,
I have been puzzled what causes a strange behavior with .forMin() function. I have a very simple script to keep a device on for 10 minutes, then off for 20 minutes:
Code: Select all
return {
on = {
timer = {
'Every 30 minutes',
}
},
execute = function(dz)
dz.devices('Device').switchOn().forMin(10)
end
}
It works for a day or two fine, but then at some point it never switches off again. In the log you can see something like this:

- dzvents.PNG (34.84 KiB) Viewed 303 times
So there is the on/off action going on fine but then at some seemingly random point in time the off action is followed by an immeadiate on, and another on after 20 minutes but then nothing. I know I can (and will) write the script in a different way to make sure off swithchin happens reliably, I was just wondering what is causing this behavior...