Choose the narrowest native setting
Begin in the smart-home app: select which devices, automations and event types should notify you. Next, open Android notification settings and inspect the app's categories. If a category maps cleanly to the important event, mark it alerting and allow it during DND.
Text-specific rules
Some apps put the device name and event in visible notification text. DND Override can match that text on the device. An app + keyword combination can distinguish a message containing “water leak” from routine status changes, or match a particular door/sensor name.
This works only with the notification presented to Android. It does not connect to a hub, local network, home-automation server or cloud account, and it does not change device state.
What to test
- Trigger the real device event and record the exact notification wording.
- Choose literal any/all matching unless a regex is truly necessary.
- Use a distinctive system or custom sound and keep alarm volume audible.
- Test with the screen locked and DND active.
- Repeat after OS, source-app or device-firmware updates because wording and delivery may change.
Where it is not appropriate
Do not treat DND Override as a smoke, carbon-monoxide, medical, intrusion or other certified life-safety alarm. It is also not designed to bypass controls on another person's phone. Use certified hardware and supported monitoring/escalation services for those needs.
See also security-camera alerts and Android's native DND exceptions.