I am looking for some help with a flow i have set up. Following is an explanation of where i am currently and the next paragraph will ask my help question. I have this set up to play a song for x when he comes home and play a random greeting for y and z when they come home. The fist node obviously reads the contact sensor on the door. The next nodes reads who is home and the one following that reads how long they have been home (it basically gives us time to get out the car, unload, get off the phone, whatever; it gives us 4 minutes to get in the house for the flow to continue. Ok, for user x an input boolean switches on that plays a song through apple homekit and the homepod but for y and z a random greeting plays through home assistants vlc media player. The y and z switch and random number node vs the random sensor node are just to see which method i like better so can be ignored.
So, here is where I am stumped for a few days now and my brain just wont work anymore. I want this flow to stop for x,y,and z after the song plays for x or greeting plays for y and z. As of now if someone was still within their 4 minute window allotted to them just to make it to the door and stood their opening and closing the door the greeting would keep repeating and I want to stop it from doing that. I know I can make more input boolleans and make this work but is their anything better than that?