mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-15 21:36:52 +00:00
Extra data attributes for telegram.notify (#21129)
Co-authored-by: root <zvldz@users.noreply.github.com> Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
5199537940
commit
7d76ddc07b
@ -377,3 +377,33 @@ inline_keyboard:
|
||||
required: false
|
||||
type: list
|
||||
{% endconfiguration %}
|
||||
|
||||
### Extra data attributes support
|
||||
|
||||
```yaml
|
||||
...
|
||||
action:
|
||||
service: notify.NOTIFIER_NAME
|
||||
data:
|
||||
title: "*Send a message*"
|
||||
message: "That's an example that sends a message with message_tag and disable_notification."
|
||||
data:
|
||||
message_tag: "example_tag"
|
||||
disable_notification: True
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
parse_mode:
|
||||
description: "Parser for the message text: `markdownv2`, `html` or `markdown`."
|
||||
required: false
|
||||
type: string
|
||||
disable_notification:
|
||||
description: True/false to send the message silently. iOS users and web users will not receive a notification. Android users will receive a notification with no sound.
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
message_tag:
|
||||
description: Tag for sent message.
|
||||
required: false
|
||||
type: string
|
||||
{% endconfiguration %}
|
||||
|
@ -236,7 +236,7 @@ Remove the bot from the chat group where it was added.
|
||||
|
||||
## Telegram notification platform
|
||||
|
||||
The [`telegram` notification platform](/integrations/telegram) requires the `telegram_bot` integration to work with, and it's designed to generate a customized shortcut (`notify.USERNAME`) to send notifications (messages, photos, documents and locations) to a particular `chat_id` with the old syntax, allowing backward compatibility.
|
||||
The [`telegram` notification platform](/integrations/telegram) requires the `telegram_bot` integration to work with, and it's designed to generate a customized shortcut (`notify.USERNAME`) to send notifications (messages, photos, documents and locations) to a particular `chat_id` with the old syntax, allowing backward compatibility. The data attributes `parse_mode`, `disable_notification` and `message_tag` are also supported.
|
||||
|
||||
The required YAML configuration now reduces to:
|
||||
|
||||
@ -527,3 +527,15 @@ action:
|
||||
title: Example Message
|
||||
message: 'Message with *BOLD*, _ITALIC_ and `MONOSPACE` Text'
|
||||
```
|
||||
|
||||
## Example: send_message with message tag
|
||||
|
||||
```yaml
|
||||
action:
|
||||
- service: notify.telegrambot
|
||||
data:
|
||||
title: Example Message
|
||||
message: "Message with tag"
|
||||
data:
|
||||
message_tag: "example_tag"
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user