Telegram Bot is being removed?

Hi everyone,
after last update 25.7 I’m getting this alert notification:

Does it mean Telegram bot will be removed or I’m using a deprecated configuration ?

Can anyone please help me with it ?

This is the portion of my conifguration.yaml:


# Telegram Bot
telegram_bot:
  - platform: polling
    api_key: !secret telegram_token
    allowed_chat_ids:
      - !secret telegram_userid

# Notifier
notify:
  - platform: telegram
    name: telegram
    chat_id: !secret telegram_userid

1 Like

No. It’s not being removed.
The legacy yaml configuration of the integration is removed.
So from now on you set it up in UI.
Many other integrations has done the same change.

So you can remove the yaml in the configuration and it should work without it.
Make a copy first though

1 Like

oh I see…
thanks

so let me try to comment those lines and see if the configuration still remain valid in the UI

1 Like

it worked!
thanks a lot for the prompt help @Hellis81

1 Like

I got the same message. I disabled the lines in my config.yaml and restarted HA. Then I found my notifications didn’t work anymore. In all automations I found that the chat_id had added the number 1 behind the id causing the id not to be valid anymore. So, “xxxxx” became “xxxxx1”. After removing those 1’s in the automations they worked again.

makes sense to shift it to UI, but this is not a straightforward shift IMO. there’s a lot of little things that have to get re-setup for each automation regarding callbacks, etc. I put my yaml back in till i can figure it out. Maybe i’m dense but this move seems not ready for prime time

If you are having issues, make sure you didn’t remove the wrong section in your configuration.yaml.

Remove telegram_bot:

# ok to remove
telegram_bot:
  - platform: polling
    api_key: !secret telegram_token
    allowed_chat_ids:
      - !secret telegram_userid

Don’t remove notify:

# keep this!
notify:
  - platform: telegram
    name: telegram
    chat_id: !secret telegram_userid
4 Likes

According to My information Telegram isn’t removed all of the bots Telegram just cracking down on certain bots that are being used for things like piracy, scams, or abuse etc.

Yet more configuration being needlessly removed from YAML :frowning:

1 Like

Hi there,
sorry for bothering, where can I find the telegram bot settings in the UI? Do I have to install some other addon/integration?

You don’t need to install anything extra; it’s part of home assistant core.
Go to Settings > Devices & services > Add integration > Telegram > Telegram bot.

Too dumb to scroll a little bit, now I found it. :see_no_evil:
Everything already there from yaml and works.
Thx!

Where exactly in the UI is the config moved to? I have the Telegram integration which is marked as legacy now and there seems to be a new integration called “Telegram bot”. My questions are should I remove the “Telegram” integration and install the new “Telegram bot” integration? I removed the config from my config yaml and my telegram messages are working. This change is a bit confusing and the documentation for what exactly needs to be changed is not great.

You can find it in the UI: Settings > Devices & services > Telegram bot
You should be able to see some entries there since the integration will automatically import from your configuration.yaml.

Yea I see the Telegram.bot integration, but there does not seem to be any way to edit the API key. Before this change the API key was contained the config yaml file and easily edited. There doesn’t seem to be any way to do that anymore.

Also, can the “Telegram” integration be deleted?

The integration does not allow you to edit the API key if it is valid.
To change the API key, revoke it first and there will be a reauthenticate prompt on the integration page.

Yes, you can delete the telegram_bot: entries in your configuration.yaml.
That will resolve the “The Telegram Bot YAML configuration is being removed” notification.

With regard to the integrations, there are 2 integrations: Telegram and Telegram bot. My question was, can the “Telegram” integration be deleted"??

Yes, you can delete the Telegram integration since it is based on the legacy notify platform.
Before you proceed to remove it, make sure you have migrated your automations.
Suppose you have the following legacy notify platform in your configuration.yaml:

notify:
  - platform: telegram
    name: my_chat

If you have any automations that uses the above notify.my_chat action, then you need to migrate it to the new notify.send_message action.
More details about the new action here: Telegram bot - Home Assistant

To remove the Telegram integration, delete the legacy telegram notify platform entries from your configuration.yaml and then restart HA.

IKR? Remember when they said “YAML is not going anywhere”?

1 Like