Telegram notification
Telegram¶
https://www.home-assistant.io/integrations/telegram_bot
-
Tell Telegram to create a bot for you:
In Telegram, open a chat with @BotFather and enter /newbot. Follow the instructions on screen and give your bot a name. BotFather will give you a link to your new bot and an HTTP API token. Store the token somewhere safe.
-
To get a chat ID, send any message to the GetIDs bot.
Then, enter /start. The bot will return your chat ID and the username.
-
Create a Telegram bot in Home Assistant:
Paste this into your configuration file:
Replace the api_key and the allowed_chat_ids with your data.
telegram_bot: - platform: polling api_key: "7225744908:AAHosDTl37A9qQ_5NjHXOGWyyeRABK2MiH0" allowed_chat_ids: - 851022032
- Create a notifier:
Paste this into your configuration file:
Replace the name and the chat_id with your data.
# Notifier
notify:
- platform: telegram
name: "mathgon_telegram"
chat_id: 851022032
Restart Home Assistant.
-
From the conversation with BotFather, select the link to open a chat with your new bot.
-
In the chat with the new bot, enter /start.
-
Test the action: