Skip to content

Commit a287ad6

Browse files
vickyg3frenck
authored andcommitted
telegram_bot: Support for sending video (home-assistant#3936)
* telegram_bot: Support for sending video Documentation for video support. Very similar to photo/document. * ✏️ Spelling & grammar fixes
1 parent 1740f62 commit a287ad6

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

source/_components/notify.telegram.markdown

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,35 @@ homeassistant:
156156
```
157157
</p>
158158

159+
### {% linkable_title Video support %}
160+
161+
```yaml
162+
...
163+
action:
164+
service: notify.NOTIFIER_NAME
165+
data:
166+
title: Send a video
167+
message: That's an example that sends a video.
168+
data:
169+
video:
170+
- url: http://192.168.1.28/camera.mp4
171+
username: admin
172+
password: secrete
173+
- file: /tmp/video.mp4
174+
caption: Video Title xy
175+
- url: http://somebla.ie/video.mp4
176+
caption: I.e. for a Title
177+
```
178+
179+
Configuration variables:
180+
181+
- **url** or **file** (*Required*): For local or remote path to a video.
182+
- **caption** (*Optional*): The title of the video.
183+
- **username** (*Optional*): Username for a URL which require HTTP authentication.
184+
- **password** (*Optional*): Username for a URL which require HTTP authentication.
185+
- **authentication** (*Optional*): Set to 'digest' to use HTTP digest authentication, defaults to 'basic'.
186+
- **keyboard** (*Optional*): List of rows of commands, comma-separated, to make a custom keyboard.
187+
- **inline_keyboard** (*Optional*): List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data.
159188

160189
### {% linkable_title Document support %}
161190

source/_components/telegram_bot.markdown

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,23 @@ Send a photo.
5252
| `keyboard` | yes | List of rows of commands, comma-separated, to make a custom keyboard. Example: `["/command1, /command2", "/command3"]` |
5353
| `inline_keyboard` | yes | List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. Example: `["/button1, /button2", "/button3"]` or `[[["Text btn1", "/button1"], ["Text btn2", "/button2"]], [["Text btn3", "/button3"]]]` |
5454

55+
56+
#### {% linkable_title Service `telegram_bot/send_video` %}
57+
Send a video.
58+
59+
| Service data attribute | Optional | Description |
60+
|---------------------------|----------|--------------------------------------------------|
61+
| `url` | no | Remote path to a video. |
62+
| `file` | no | Local path to a video. |
63+
| `caption` | yes | The title of the video. |
64+
| `username` | yes | Username for a URL which requires HTTP basic authentication. |
65+
| `password` | yes | Password for a URL which requires HTTP basic authentication. |
66+
| `authentication` | yes | Define which authentication method to use. Set to `digest` to use HTTP digest authentication. Defaults to `basic`. |
67+
| `target` | yes | An array of pre-authorized chat_ids to send the notification to. Defaults to the first allowed chat_id. |
68+
| `disable_notification` | yes | 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. Defaults to False. |
69+
| `keyboard` | yes | List of rows of commands, comma-separated, to make a custom keyboard. Example: `["/command1, /command2", "/command3"]` |
70+
| `inline_keyboard` | yes | List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data. Example: `["/button1, /button2", "/button3"]` or `[[["Text btn1", "/button1"], ["Text btn2", "/button2"]], [["Text btn3", "/button3"]]]` |
71+
5572
#### {% linkable_title Service `telegram_bot/send_document` %}
5673
Send a document.
5774

0 commit comments

Comments
 (0)