pimp1310
(Pimp1310)
August 22, 2021, 10:02am
1
Hello,
i created a second bot, for other infos than the first one, but i cant get it to work correctly, he always post the messages in one bot, not how i set it in the second one.
my config:
telegram_bot:
- platform: polling
api_key: XXXX
allowed_chat_ids:
- 123456
- platform: polling
api_key: XXXXX
allowed_chat_ids:
- 123456
and
notify:
- name: HA_Messenger
platform: telegram
chat_id: 123456
api_key: xxxxx
- name: HA_Messenger_spritpreise
platform: telegram
chat_id: 123456
api_key: xxxxx
the problem is i have overall the same chat id?
why send he all messages now to one bot?
thank you
EDIT
i tried it over groups but how can i get the chatid of the group?
tom_l
August 22, 2021, 10:22am
2
This is how I do it:
Configuration.yaml
telegram_bot:
- platform: webhooks
api_key: !secret telegram_api_key
allowed_chat_ids:
- !secret telegram_general_chat_group_id
- !secret telegram_system_chat_group_id
- !secret telegram_tom_id
trusted_networks:
- 149.154.160.0/20
- 91.108.4.0/22
notify:
- platform: telegram
name: telegram_general
chat_id: !secret telegram_general_chat_group_id
- platform: telegram
name: telegram_system
chat_id: !secret telegram_system_chat_group_id
Invite the @GetIDs
bot to your group to get the group id.
pimp1310
(Pimp1310)
August 22, 2021, 10:31am
3
i created a group, then invited homeassitant (my regular bot) and the GetIds bot.
then i went to the webpage and get die chat id of the group. for example 01234
then i go to configuration.yaml and add this to my config
telegram_bot:
- platform: polling
api_key:
allowed_chat_ids:
- the old one
- 01234
notify:
- name: HA_Messenger
platform: telegram
chat_id:
- name: telegram_group_spritpreise
platform: telegram
chat_id: 01234
but when i try to send a notifycation to the groups id, it cones nothing,
pimp1310
(Pimp1310)
August 22, 2021, 11:13am
4
have you perhaps a “- symbol” before your group chat id?
tom_l
August 22, 2021, 11:15am
5
Yes both my group chat ids have a dash in front of them. Try putting your chat ids in single quotes.
1 Like
pimp1310
(Pimp1310)
August 22, 2021, 11:18am
6