31.08.2021, 15:41
Yes,
the original code is something like..
if (a and b) then
action 1
sleep 5 minutes
action2
end
Objectively there are two problems.
The first one is that a script is triggered both with value 0 or 1 of the trgger (this is the reason for the initial AND)
The second one is that each time a trigger is received a "brand new" copy of the same event-based script is executed, so after 5 minutes the first script executes action 2 even if a second script (or a third or..) is still running.
The simplest solution is the use of a.. scene.
It's possible to choose if the scene is executed when trigger address is 0 or 1 and a new trigger restarts the same scene extending the overall time.
Now I only have to make an external AND logic (1/1/1 AND 1/1/2) whose result will trigger the scene
the original code is something like..
if (a and b) then
action 1
sleep 5 minutes
action2
end
Objectively there are two problems.
The first one is that a script is triggered both with value 0 or 1 of the trgger (this is the reason for the initial AND)
The second one is that each time a trigger is received a "brand new" copy of the same event-based script is executed, so after 5 minutes the first script executes action 2 even if a second script (or a third or..) is still running.
The simplest solution is the use of a.. scene.
It's possible to choose if the scene is executed when trigger address is 0 or 1 and a new trigger restarts the same scene extending the overall time.
Now I only have to make an external AND logic (1/1/1 AND 1/1/2) whose result will trigger the scene