From 5caeaa3e30da98e7aac8c2a289173bf0c4ff7fb1 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Thu, 31 Aug 2023 13:02:32 -0700 Subject: [PATCH] Update alert.markdown with companion app examples (#28753) * Update alert.markdown with companion app examples * style fix --- source/_integrations/alert.markdown | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/source/_integrations/alert.markdown b/source/_integrations/alert.markdown index 203d7c4b7a2..c3671c4a0f8 100644 --- a/source/_integrations/alert.markdown +++ b/source/_integrations/alert.markdown @@ -292,4 +292,23 @@ but you will still receive the done message. entity_id: alert.garage_door ``` +Notifications sent to Home Assistant Companion apps support [replacing](https://companion.home-assistant.io/docs/notifications/notifications-basic/#replacing) and [clearing](https://companion.home-assistant.io/docs/notifications/notifications-basic/#replacing) notifications. To use these functions with alerts, set a `tag` in the message data, send `clear_notification` as the `done_message`, and use `mobile_app_*` as the notifier: + +```yaml +alert: + garage_door: + name: Garage is open + done_message: clear_notification + entity_id: input_boolean.garage_door + state: "on" + repeat: 30 + can_acknowledge: true + skip_first: true + notifiers: + - mobile_app_ryan + - mobile_app_kristen + data: + tag: garage-door +``` + [template]: /docs/configuration/templating/