Update alert with acknowledge example (#16646)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Gerard 2021-02-19 23:55:58 +01:00 committed by GitHub
parent 1081fa1de7
commit 1d3e7e5616
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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/