I have a question that has been asked before but I don't think it has been answered -
viewtopic.php?f=31&t=19255&p=149148&hil ... in#p149148. It has to do with resetting a timed event. Example if I write
Code: Select all
switchOff().afterMin(10) and not(domoticz.devices('motion sensor').bState)
it will activate a switch OFF after 30 min if there is no motion. However if sometime during that 10 min period motion is detected and I want to keep the light ON, the light will still shut OFF after 10 min no matter the status of the motion sensor. No matter if I switchOn().
Is there a way to reset a timed event?
To get around this I have used a function that gets the current time in minutes, add a delay number to it and compare that to the current time in minutes. It can be easily reset at any time unlike afterMin().
Am I missing something? Anything easier?