Home Assistant Telegram Messaging App Integration

Опубликовано: 27 Апрель 2026
на канале: zoltar99
1,423
14

In this video I show you how to integrate Telegram messaging into Home Assistant, so that you can create automations that notify you of things that happen in Home Assistant that are important to you. You will need to have a Telegram account. If you don't have one, you can create one for free, you will need a mobile phone number so that you can register.
First you need to create a new bot. For that, in the Telegram search box, search for BotFather. Once found, open it and type /newbot. It will ask you what you would like to call it. Give it a name. Next step is to choose a username for your bot, it must end in 'bot', for example 'Tetrisbot'. You will probably need a few tries, as the name must be unique, if it isn't, it will tell you 'Sorry, this username is already taken'.
Once you chose a username, it will give you the URL where to find it. Open it and type /start. You will also get the API token. You will need this token to configure Telegram in configuration.yaml.
You will also need your chat_id. Search for 'chat ID echo'. Open it and type 'echo'. It will return your Telegram Chat ID. You will also need this for Home Assistant.
Now go to configuration.yaml. Insert the following lines:
telegram_bot:
platform: polling
api_key: yourAPItoken
allowed_chat_ids:
yourchatIDnumber
notify:
name: nameoftheservice (for example 'telegram', or whatever else)
platform: telegram
api_key: yourAPItoken
chat_id: yourchatIDnumber
Save it and restart Home Assistant. Once it's back up, create an automation, for example when a light turns on. The trigger is the service light.turn_on, and the action type is Call Service, service name is notify.nameoftheservice (whatever you named it earlier). In the Service Data, put: message: The_message_you_want_to_receive_in_Telegram. Save it and you're done.
Now every time the light turns on, you will receive a notification in Telegram.
For more details, please follow the video. If you have any questions or comments, please leave them below and I'll try my best to help.