Nope. The best workaround is to put a test at the start of each function and bail out if a global variable has been set. You then “kill” the timer by setting that variable. Done right, it’s indistinguishable from cancelling the delay directly.
well thats easy to accomplish …
i use a physical switch with the scene in question, and on the end the switch will be turned off.
so i can just use the status of the switch to falsify timers, its just very pitty that this is not really possible.
but it does getting quite complicated on other scenarios where things just overlapping.
it would be so super easy to just be able to terminate a whole timer … or at least be able to restart them … (using the same name or somethings)
actually there is somethings going on if timers do have the same name … i noticed this quite some time ago … that things just have random outcomes …
so i renamed the timers (added the scene numbers behind the names) and this stoped immideatly.
so the data seems to be avaiable to other processes … its just not asked for …
It’s bad form to have a lot of return statements in a function.
My feeling is that they should be near the beginning (Early exit) or at the end … final return … Otherwise it becomes very difficult to understand the meaning of the function.
But if no one else needs to look at it … do what ever you want!
[quote=“RichardTSchaefer, post:7, topic:177349”]It’s bad form to have a lot of return statements in a function.
My feeling is that they should be near the beginning (Early exit) or at the end … final return …[/quote]
thats exactly my toughts too
with this confirmed i simply make on line 1 a conditions check, if it fails … return …
much better than having another if/else
and its really easy co copy & paste too
and i dont have to increment all the rest of the code for the else
Best Home Automation shopping experience. Shop at Ezlo!