Hi @Jari_Peuhkurinen ,
Most important is that the first card When… is only a trigger that fires at an incident. Then the flow is works off and stops. It starts only again if the next incident occurs, in your case - the alarm changes from off to on.
Usually you should avoid busy-wait, but in some cases it might be useful or an easy start.
yellow lines after the And… cards mean in case of NO
That is not anything I would suggest. But it is more or less how you looked on the problem - and it would work.
Then you could check how others solve similar problems and which solution you like the best.