Need door sensor (if left open) to activate alarm siren. Then when closed, turn off siren

I have seen many apps that almost cover all of my needs but it’s the last piece, the turning off after the door is closed that I cannot find. I had a topic in the wrong board but I think this is the right place for this request.

If I am wrong, please let me know and I will remove.
Thanks in advance for your help.

Best,
Noah

This seems to work, let me know if it doesn’t

This is perfect! Thank you so much, really appreciate it

I need to only strobe work, I have GoControl Z-Wave Siren and Strobe, WA105DBZ-1.