Telegram Bot: Conversation with Assist (and others like OpenAI)

I’ve just added a second automation for a second bot that i use for a different purpose. Every automation made with your blueprint has a different conversation agent. Now if i chat with one bot i receive 2 answers, one from every bot. One of the 2 bots is in a group while the other one isn’t, if i chat directly to the bot that is not in the group, i receive 2 answer in the group and not in the private chat…

Nevermind, looks like you can’t have 2 different bots in ha

Hi @Herian!

Since you mention that your two different bots are used in different chats, you could whitelist the chat ID for each bot so that they don’t receive messages from other chats. You can find this option at the end of the blueprint configuration page.

I hope it helps!

Thank you @marc-romu, the thing is that if i talk to one bot in a private chat, i get the answer in the group chat. Looks like it is a ha problem that cant manage more then 1 telegram bot, so is not a blueprint issue i guess.
I can try to play with the whitelists this evening when i get home… i’m in the group where one bot is, so if i whitelist the group chat id and i talk to the bot, what is suppose to happens? The bot should answer in the group even if my personal chat id is not whitelisted?

I can confirm that is not working even with the whitelist. I’ve whitelisted the group chat id for the bot in the group and my chat id for the bot that is not in a group. If i ask something to the bot in the group that is in the group, i receive an asnwer by both bots. If i send a private message to the bot that is not in the group, he answer me in the group and not in the private chat (even if i select reply in private chat)

Hi @marc-romu, there’s a way to achieve what you did with the telegram bot with a wapp bot?

Hi @Herian !

There should first exist a WhatsApp integration for Home Assistant. I don’t think it exists, and the WhatsApp API is only for businesses, so it would be difficult to make something like a Telegram bot unless something changes on WhatsApp.

Merry Christmas!

Installed the blueprint, shows as automation. Bot working, but not responding no matter what… What am I missing…?

Hello @Protos87 and happy new year!

Let’s try to debug your case:

  1. Ensure you properly set up the bot, including the list of allowed ID’s (Telegram polling - Home Assistant). You can try your bot using the actions and listening to events in the developer tools panel of your Home Assistant.
  2. Ensure your Conversation Agent is working too. You can try it using the native Assist chat in Home Assistant.
  3. In the blueprint, ensure to select the desired Conversation Agent. I’d recommend not to specify any ID in the whitelist to check if this is the problem.
  4. Some people reported misfunctions when in group chats, so try it using a private chat with your bot first.

I hope it helps!

Managed to get it to work. Only replies in private, not a group chat with me and my wife. Conversation agent is Gemini. Lacks memory. Any tips to make it to reply in group chat…? I use him to send me alerts from my CCTV in group chat. That thing it does well. But not replying to me…

Edit:
Started from scratch, now out of a sudden works as expected!

Hi @Protos87 ,

In the past, we also discussed a similar problem. I believe it is an issue with the Telegram bot integration, not the blueprint. I don’t know how to solve it, sorry…

Very very cool!
All fine working! Exactly what i needed.
But … Will you update with speech recognition from voice message & Whisper?

Hello @John_Doe,

I’m glad you like this blueprint!

I’d really like to be able to send and receive voice messages through Telegram, but the Telegram integration in Home Assistant currently doesn’t support receiving them (Telegram - Home Assistant). This means that it’s not as simple as modifying the blueprint; it also requires getting into the integration’s code and adding support for the latest Telegram API features. I can’t currently do it because I’m overwhelmed with work :pensive: but I’m definitely adding it to my to-do list.

Thanks for the information!