A customized version of the standard Home Assistant Telegram Bot integration, patched to work with Home Assistant 2026.2 (Core) and later, which utilize Python 3.13.
It is recommended to use this component together with Telegram Custom Notify: https://github.com/SalvatoreITA/Telegram-Custom
Unlike the native integration, this Custom Component has been designed to be totally independent from the Home Assistant Core.
- Autonomous Connection Management: This component handles the Telegram server connection logic (Polling) entirely. It does not rely on shared libraries that could be removed or updated in incompatible ways by Home Assistant.
- Included Libraries (Vendoring): All necessary dependencies (such as
python-telegram-bot) are physically included inside the component folder.- Standard Integration: Uses system libraries. If Home Assistant updates Python and breaks compatibility (as happened with 2026.2), the integration stops working.
- This Custom Component: Uses its own internal libraries. Even if Home Assistant radically changes its Python environment in the future, this component will continue to work because it travels with its personal "survival kit," isolated from operating system changes.
In short: Install it once and forget about it. As long as the Telegram APIs do not change, this component will continue to work regardless of Home Assistant updates.
- Open HACS in your Home Assistant.
- Go to Integrations > Menu (3 dots top right) > Custom repositories.
- Paste the URL of this GitHub repository: https://github.com/SalvatoreITA/telegram-custom-bot
- In the category, select Integration.
- Click Add and then Download.
- Restart Home Assistant.
- Download this repository.
- Copy the
telegram_botfolder into the/config/custom_components/folder of your Home Assistant. - Restart Home Assistant.
If you are coming from an old installation, initially keep your configuration in the configuration.yaml file for the first restart.
telegram_bot:
- platform: polling
api_key: "YOUR_TELEGRAM_API_KEY"
allowed_chat_ids:
- 123456789After rebooting, Home Assistant will automatically import these settings into the GUI (Settings > Devices & Services). If you receive a notification asking you to remove the Telegram configuration from the YAML file, you can safely delete (or comment out) those lines in configuration.yaml. The bot is now configured and managed via the UI.
This project is an independent and unofficial integration. It is not affiliated, associated, authorized, sponsored, or in any way officially connected with Telegram or any of its subsidiaries or affiliates.
The official Telegram website can be found at: https://telegram.org.
Every little bit of support makes a huge difference: it keeps the enthusiasm alive and motivates me to create and share new solutions for the community. Thank you from the bottom of my heart! 🚀
Developed by: Salvatore Lentini - DomHouse.it