From 1af229c14629ccbb9f23ff5bce51064b61531d82 Mon Sep 17 00:00:00 2001 From: Vignesh Venkat Date: Sat, 18 Nov 2017 01:29:41 -0800 Subject: [PATCH] telegram_bot: Support for sending video (#3936) * telegram_bot: Support for sending video Documentation for video support. Very similar to photo/document. * :pencil2: Spelling & grammar fixes --- source/_components/notify.telegram.markdown | 29 +++++++++++++++++++++ source/_components/telegram_bot.markdown | 17 ++++++++++++ 2 files changed, 46 insertions(+) diff --git a/source/_components/notify.telegram.markdown b/source/_components/notify.telegram.markdown index 7df967d6289..ac89f6f23c7 100644 --- a/source/_components/notify.telegram.markdown +++ b/source/_components/notify.telegram.markdown @@ -156,6 +156,35 @@ homeassistant: ```

+### {% 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 %} diff --git a/source/_components/telegram_bot.markdown b/source/_components/telegram_bot.markdown index c4d93c43bc5..be2dcff5e5c 100644 --- a/source/_components/telegram_bot.markdown +++ b/source/_components/telegram_bot.markdown @@ -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.