From 1d3e7e561610e5ae42a4a97c9afc432019da4401 Mon Sep 17 00:00:00 2001 From: Gerard Date: Fri, 19 Feb 2021 23:55:58 +0100 Subject: [PATCH] Update alert with acknowledge example (#16646) Co-authored-by: Franck Nijhof --- source/_integrations/alert.markdown | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/source/_integrations/alert.markdown b/source/_integrations/alert.markdown index 63b03a2bf8b..7f25ed77d12 100644 --- a/source/_integrations/alert.markdown +++ b/source/_integrations/alert.markdown @@ -252,7 +252,9 @@ Some notifiers support more parameters (e.g., to set text color or action # Example configuration.yaml entry alert: garage_door: - name: Garage is open + name: "Garage is open" + message: "The garage door is still open" + done_message: "The garage door is closed" entity_id: input_boolean.garage_door state: "on" # Optional, 'on' is the default value repeat: @@ -270,4 +272,20 @@ alert: This particular example relies on the `inline_keyboard` functionality of Telegram, where the user is presented with buttons to execute certain actions. +Based on the example above you can make an automation to stop further messages, +but you will still receive the done message. + +```yaml +- alias: "Telegram callback to stop alerts for garage door" + trigger: + - platform: event + event_type: telegram_callback + event_data: + data: "/garage_acknowledge" + action: + - service: alert.turn_off + target: + entity_id: alert.garage_door +``` + [template]: /docs/configuration/templating/