I have a scene that notifies me on my speakers if I have a water leak at my hot water tank.
But my wife made a pertinent remark.
The scene would need to restart every y minutes.
So waiting y minutes is doable. But restarting the same scene x times isn’t possible, right?
Right now I don’t see how to do an « and » in the triggers
I can’t make conditions like counter != 0
Because when it gets reset to 0 I won’t enter this scene anymore
You can repeat the alert as long as the leak lasts, without duplicating the scene. Since Gladys 4.86, the editor has the While… Repeat… block.
For the balloon:
Trigger: the leak.
While… block: the condition « the leak is still there ».
In Repeat…: the message on the speakers, then Wait Y minutes.
Maximum number of iterations: X, to stop even if the leak remains.
The condition is rechecked each time. An Get the last state action, placed before the condition, refreshes the value each time. When the leak disappears, the loop stops. If you reach X, only the loop stops: the actions placed after continue.
I’m moving this topic to « Delivered requests ». If there’s still a case that doesn’t fit, open a new topic: it’ll be easier to follow.