Clear push notification when routine no longer true?

I want a notification when my garage door is open. I have a garage tilt sensor for that. The automation for the notification works great. However, I want the notification to clear if the sensor detects the garage is closed. At the moment, the old notification just stays there.

Is there a way to clear the notification if it’s no longer true? Or is this something for, say, Tasker on Android?

For what it’s worth, I did end up using Tasker. Essentially, I created a second notification that has the text “Garage is closed” for when the contact/tilt sensor thinks the garage is closed. Then, I made a Profile to detect the text of my “Garage is closed” Smartthings notification, and used “AutoNotification - Cancel” to clear both it and the “Garage is open” notification.