After the notification, add a wait_for_trigger containing a State Trigger that listens for the door’s state changing from on to off. Put the second notification after the wait_for_trigger.
Use the alert integration which is designed for this, and has the ability to send a message when the condition that caused the alert to fire (which can also repeat), is no longer true.
eg:
boiler_fault:
name: Boiler Fault
done_message: "The Boiler is working normally"
message: "*Boiler Fault* The boiler is not working!"
entity_id: binary_sensor.boiler_fault
state: 'on'
repeat: 30
can_acknowledge: true
notifiers:
- tg_house_group