telegram_bot: Support for sending video (#3936)

* telegram_bot: Support for sending video

Documentation for video support. Very similar to photo/document.

* ✏️ Spelling & grammar fixes
This commit is contained in:
Vignesh Venkat 2017-11-18 01:29:41 -08:00 committed by Paulus Schoutsen
parent c38c00b00d
commit 1af229c146
2 changed files with 46 additions and 0 deletions

View File

@ -156,6 +156,35 @@ homeassistant:
```
</p>
### {% linkable_title Video support %}
```yaml
...
action:
service: notify.NOTIFIER_NAME
data:
title: Send a video
message: That's an example that sends a video.
data:
video:
- url: http://192.168.1.28/camera.mp4
username: admin
password: secrete
- file: /tmp/video.mp4
caption: Video Title xy
- url: http://somebla.ie/video.mp4
caption: I.e. for a Title
```
Configuration variables:
- **url** or **file** (*Required*): For local or remote path to a video.
- **caption** (*Optional*): The title of the video.
- **username** (*Optional*): Username for a URL which require HTTP authentication.
- **password** (*Optional*): Username for a URL which require HTTP authentication.
- **authentication** (*Optional*): Set to 'digest' to use HTTP digest authentication, defaults to 'basic'.
- **keyboard** (*Optional*): List of rows of commands, comma-separated, to make a custom keyboard.
- **inline_keyboard** (*Optional*): List of rows of commands, comma-separated, to make a custom inline keyboard with buttons with associated callback data.
### {% linkable_title Document support %}

View File

@ -52,6 +52,23 @@ Send a photo.
| `keyboard` | yes | List of rows of commands, comma-separated, to make a custom keyboard. Example: `["/command1, /command2", "/command3"]` |
| `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"]]]` |
#### {% linkable_title Service `telegram_bot/send_video` %}
Send a video.
| Service data attribute | Optional | Description |
|---------------------------|----------|--------------------------------------------------|
| `url` | no | Remote path to a video. |
| `file` | no | Local path to a video. |
| `caption` | yes | The title of the video. |
| `username` | yes | Username for a URL which requires HTTP basic authentication. |
| `password` | yes | Password for a URL which requires HTTP basic authentication. |
| `authentication` | yes | Define which authentication method to use. Set to `digest` to use HTTP digest authentication. Defaults to `basic`. |
| `target` | yes | An array of pre-authorized chat_ids to send the notification to. Defaults to the first allowed chat_id. |
| `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. |
| `keyboard` | yes | List of rows of commands, comma-separated, to make a custom keyboard. Example: `["/command1, /command2", "/command3"]` |
| `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"]]]` |
#### {% linkable_title Service `telegram_bot/send_document` %}
Send a document.