Hello,
i have problems to add a second user to the bot.
How can i use the bot with to users?
You could specify a little more context:
- what is your config
- what did you try
- what do you refer to as âuserâ?
Thats is in my config.yaml
# Telegram Bot integration
telegram_bot:
- platform: polling
api_key: ********
allowed_chat_ids:
- *******
- ********
# Notifier
notify:
- name: Mustafa
platform: telegram
chat_id: ********
- name: Julia
platform: telegram
chat_id: *********
telegram_bot:
- platform: polling
api_key: !secret telegram_api
allowed_chat_ids:
- 1234567890
- 3456789012
- -543219876
You are missing an id. 2 belong to persons and 1 to the bot(itâs the one with the first digit is a â-â)
# Telegram Bot integration
telegram_bot:
- platform: polling
api_key: ****
allowed_chat_ids:
- 23323090
- 898977979
# Notifier
notify:
- name: Mustafa
platform: telegram
chat_id: 23323090
- name: Julia
platform: telegram
chat_id: 898977979
is that right?
Where can i find the id with â-â?
HOME ASSISTANT - TELEGRAM INTEGRATION - TUTORIAL
Watch the video
Donât be tempted to post the bot id on the forum or it will compromise your security. I hope those idâs in your last post are not your real ones.
No, its not the right ids.
I have see the video, the first user works, but the second doesnt.
How can i add a second one?
My mistake, I thought you were trying to set up a group chat between 2 people and bot. I think you are trying then just to get the 2nd person to start a conversation with the 1st users bot. Your HA bot will only be able to speak back to the allowed IDs so you have that set up already. The 2nd person needs to search for and contact your bot first @whatever_bot
My mistake!
I want make an automation, they send message to the bots.
Thatâs the point: you need to setup the 2nd user with the 1st users bot. Thatâs all. Open Telegram on the 2nd users cellphone and start a chat with the 1st users bot. Thatâs all!
How can i do this?
open up the telegram app on the phone of the second user. Press on the icon that looks like a spy glass. Type in an @ followed by the name of your telegram bot. It should end in _bot.
Your bot will then appear below that so select that. You may then have to select start bar that will appear at the bottom of the phone.
It dont work.
I think the two bots in the group, but the group become the message.
Only my own bot.
# Telegram Bot integration
telegram_bot:
- platform: polling
api_key: token
allowed_chat_ids:
- 1003226772
- -4228333333333
# Notifier
notify:
- name: Mustafa
platform: telegram
chat_id: mybotid
- name: group name
platform: telegram
chat_id: -4228333333333
If you just want to receive messages, youâre better of with the âbroadcastâ platform in telegram.
Change the platform from âpollingâ to âbroadcastâ
telegram_bot:
- platform: broadcast
If it works for one user, it must work for the other user as well. If it doesnât, there must be something âwrongâ with the configuration of that user. Are you sure you did the configuration of the bot right? Not the config in HA, that seems to be working (as one user receives the messages), the config for the telegram bot.
Maybe you start fresh. Take the example setup from this page, and work it through, just use the âbroadcastâ platform instead (as shown in the example) of âpollingâ.
Let us know, how you get along.
PS: If it wonât work, I will later ask you, exactly at what point in that guide you were stuck, so please do it step by step and make notes what happens.