Two Sets of Rules: One for “sensor triggers siren when system state is armed” and one to Control when the system state changes
You will have two system states: one where the garage door sensor can trigger the siren, and one where it doesn’t. You can either use the overall system state called “mode” or you can use the smart home monitor “armed” state. You’ll set up a rule so that the garage door sensor opening triggers the siren only when the system state is Appropriate to do so.
Then you will set up two more rules that control when the system state changes. If you use mode, it might be “home” when you unlock the door and “away” when you lock it. Other people will be able to help you figure out what to is if you get stuck.
You can actually do all kinds of combinations with this. You could have System state change for many different reasons, time of day, who is home, whether it’s cold out, change it manually, etc. and those parameters can be combined into one rule or spread out over many.
The concept is easy, it’s getting the rules set up that takes research
Since you are in the US, there are two third-party rules engines that make setting this up pretty straightforward. The authors of both participate regularly in the forums, so you can ask questions and make suggestions.
You may still need a custom device type for the lock. But after that the rules set up should be intuitive with either of these as long as the features are supported.
The first one has been around longer and has more options. However, it’s IOS only, and it is a paid app of about nine dollars. Lots of features. I’m pretty sure your use case would be very easy to set up. You purchase it through the regular App Store.
And this is the author’s topic where you can find them to ask questions:
Second one is a free contribution developed by a community member. Very nice. Browser-based, so it should work on any phone or tablet.
https://www.simplerulebuilder.com/about/
And the author’s topic for that one:
I like both of these. And, no, I don’t know why the official SmartThings mobile app doesn’t come with something like this built-in. Obviously these guys have proven it can be done. Maybe it’s just the fact that these often still require custom device types, and smartthings is waiting until that requirement is removed?
Sorry the answers for these have to be so long. Smart things is a very powerful system that lets you do a lot of complex stuff with many different devices of different protocols. But the process to get everything set up is often complex.