I have configured the telegram bot in Home Assistant.
In my automations the “notify.telegram” works as expected and it sends messages to a group.
The “telegram_bot.send_photo” sends a message (picture) to the bot itself and notifies me on the telegram app. How do I send the picture to the group?
My configurations:
# configuration.yaml
# Telegram bot
telegram_bot:
- platform: polling
api_key: my api key
allowed_chat_ids:
-group id number
notify:
- platform: telegram
name: telegram
chat_id: -group id number
This works and sends a message to the defined group
Guys, I’m having a similiar problem to the poster above, I’ve been messing about with different configs but I just cannot get this to work
I’ve been using Telegram just fine all along, but I was only messaging the bot (myself) of any notifications.
Now I have a need to message a group on Telegram, and despite putting in the -groupid and configuring it all the same, I cannot get the message to go to the group. Even when I remove the individual bot id and just leave the group id in, it STILL messages the bot alone. It is definitely something to do with my HA config, since I can message the group from the web api… I’ve attacched my code below, even with those bits commented out, it still sends to the bot only. Tearing my hair out here! ANy ideas anyone?
Hi yf, yeah I’ve done that too, and promoted the bot to admin and all that… I’m stumped by it, I think the telegram end is configured okay, since I can message the group via the web api at this link:
This string works fine when invoked in a browser, which kinda says to me that the telegram bit is ok, but HA is not using it no matter what I stick in the yaml… its very frustrating, maybe it would help if I knew how to code!! LOL
Thank you so much yf_ha, the problem was in how I was invoking the message data in the automation, it was your code snippet from your automation gave me the clue. Thank you very much my friend!
It seems the ‘Target’ information is where you specify the intended recipient(s)… its working fantastic for me now!!!