Telegram Woes

I need some help setting up Telegram. I have tried over and over and can’t get it to work, so any assistance would be greatly appreciated! I followed the BurnsHA YouTube vid for my setup, but I am getting the following error in the log:

[homeassistant.components.telegram_bot] Error sending message: Chat not found. Args: (mychatid)

Here is my pertinent config.yaml:

#------------------------------------------------
#---- Telegram                                  
#------------------------------------------------

telegram_bot:
  - platform: polling
    api_key: 123456789:abcdefghijklmnopqrstuvwxyzabcdefghijklmnopq
    allowed_chat_ids:   
      - 1111111111

notify:
- platform: telegram
  name: telegram
  chat_id: 1111111111

I got it working! Thanks to user ‘Kallb123’, the following link helped me out (the part about " One thing they all seemed to miss though, is that you need to send a message to your bot before it can interact with you.")

Hope this helps someone else like it helped me!

2 Likes

I make me crazy , with this error, i try a lot of things and no solve my problem “Chat not found”.

Now work for me, thanks @Kallb123, and @sparkytech

Only explain more for other users that you can create a chat with your bot in telegram create a new message and write @mybotname and send ‘hello’ , now work for me. Thanks

You helped me out! Was pulling my hair out over this silly thing of needing to send a message to it first. Thanks for documenting!

I’m trying to find right configuration…

this is mine:

telegram_bot:
  - platform: polling
    api_key: !secret api_key_telegram_daniele
    allowed_chat_ids:
      - !secret chat_ids_telegram_daniele
  - platform: polling
    api_key: !secret api_key_telegram_barbara
    allowed_chat_ids:
      - !secret chat_ids_telegram_barbara

notify:
 - name: telegram_daniele
   platform: telegram
   chat_id: !secret chat_ids_telegram_daniele
 - name: telegram_barbara
   platform: telegram
   chat_id: !secret chat_ids_telegram_barbara
 - name: famiglia
   platform: group
   services:
     - service: telegram_daniele
     - service: telegram_barbara

where is the problem? I used two different telegram account to create two token to create 2 bots, …but I’m able to use notification only to one bot…

I also tried this config:

telegram_bot:
  - platform: polling
    api_key: !secret api_key_telegram_daniele
    allowed_chat_ids:
      - !secret chat_ids_telegram_daniele
      - !secret chat_ids_telegram_barbara

i have the same problem. any solution? y can send message tho the second id

Don’t know if it is the solution YOU are looking for, but I can tell the solution worked for me.
I was getting crazy just because I forgot to start the BOT. Try to login on the bot page (@bot_name) and write /start.