Add telegram disable_web_page_preview (telegram_bot.markdown) (#23571)

This commit is contained in:
ildar170975 2022-08-08 18:06:20 +03:00 committed by GitHub
parent 628dda81e5
commit 6a5b96272a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -253,7 +253,7 @@ Remove the bot from the chat group where it was added.
## Telegram notification platform ## 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 data attributes `parse_mode`, `disable_notification` and `message_tag` are also supported. 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`, `message_tag` and `disable_web_page_preview` are also supported.
The required YAML configuration now reduces to: The required YAML configuration now reduces to:
@ -556,3 +556,16 @@ action:
data: data:
message_tag: "example_tag" message_tag: "example_tag"
``` ```
## Example: send_message with disabled webpage preview:
```yaml
action:
- service: notify.telegram
data:
message: >-
<a href="https://www.home-assistant.io/">HA site</a>
data:
parse_mode: html
disable_web_page_preview: true
```