Skip to content

Commit cfbea69

Browse files
azogueballoob
authored andcommitted
telegram_bot platform to only send messages (home-assistant#8186) (home-assistant#2882)
* add telegram_bot/onlysend doc for home-assistant#8186 * change of platform name and small rewrite * fix new platform name
1 parent 284e4d7 commit cfbea69

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
layout: page
3+
title: "Telegram broadcast"
4+
description: "Telegram support to send messages only"
5+
date: 2017-06-24 11:20
6+
sidebar: true
7+
comments: false
8+
sharing: true
9+
footer: true
10+
logo: telegram.png
11+
ha_category: Telegram chatbot
12+
ha_release: 0.48
13+
---
14+
15+
Telegram implementation to support **sending messages only**. Your Home Assistant instance does not have to be exposed to the Internet and there is no polling to receive messages sent to the bot.
16+
17+
To integrate this into Home Assistant, add the following section to your `configuration.yaml` file:
18+
19+
```yaml
20+
# Example configuration.yaml entry
21+
22+
telegram_bot:
23+
- platform: broadcast
24+
api_key: <telegram api key>
25+
allowed_chat_ids:
26+
- 12345
27+
- 67890
28+
```
29+
30+
Configuration variables:
31+
32+
- **allowed_chat_ids** (*Required*): A list of user in the `user_id` Telegram format enabled to interact to webhook
33+
- **api_key** (*Required*): The API token of your bot.
34+
- **parse_mode** (*Optional*): Default parser for messages if not explicit in message data: 'html' or 'markdown'. Default is 'markdown'.
35+
36+
To get your `chat_id` and `api_key` follow the instructions [here](/components/notify.telegram/).
37+

source/_components/telegram_bot.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Use Telegram on your mobile or desktop device to send and receive messages or co
1717

1818
This component creates notification services to send, or edit previously sent, messages from a [Telegram Bot account](https://core.telegram.org/bots) configured either with the [polling](/components/telegram_bot.polling/) method or with the [webhooks](/components/telegram_bot.webhooks/) one, and trigger events when receiving messages.
1919

20+
If you don't need to receive messages, you can use the [broadcast](/components/telegram_bot.broadcast/) platform instead.
2021

2122
### {% linkable_title Notification services %}
2223
Available services: `send_message`, `send_photo`, `send_document`, `send_location`, `edit_message`, `edit_replymarkup`, `edit_caption`, `answer_callback_query`.

0 commit comments

Comments
 (0)