telegram_bot platform to only send messages#8186
Conversation
|
We should change this line to check for |
MartinHjelmare
left a comment
There was a problem hiding this comment.
I think this is ok. I'm a bit hesitant about the platform name, but I don't have a better suggestion either.
There was a problem hiding this comment.
I don't like the name either, was hoping someone to suggest a better one, lol
Going to update the description and make the doc.
Thanks for reviewing!
|
Yeah the name is a bit strange, but I have also no better sugestion... |
|
I spoke too soon. Didn't notice it's a platform under the telegram_bot platform. |
|
Suggestion: |
f3dd1c5 to
f38a52b
Compare
|
ok, so |
| """Set up the Telegram broadcast platform.""" | ||
| # Check the API key works | ||
| import telegram | ||
| bot = telegram.Bot(config[CONF_API_KEY]) |
There was a problem hiding this comment.
I think one of that line is not async safe...
There was a problem hiding this comment.
I think they are, but not the next, getting the bot username. Pushed a commit to fix
* add new telegram_bot platform to only send messages * Fix async
|
After telegram_bot was introduced we, unfortunately, can't use more than one bot for notifications. It may be useful when we use customize notifications for different bots(chats) in the messenger (different type of notifications, for example - info, warn, crit). |
|
Yes, you can. This platform allows you to only send messages. Which allows you to use the bot for notification from multiple hass instances, and other software as well. I use a single bot for notifications from 2 hass instances, and 2 other pieces of software. All in all total 4 "inputs" that send messages. |
|
But, I need two bots on only one hass instance. |
|
Aha, I see your use case. Maybe you can try adding multiple bots. I see the |
|
Pull requests should not be used for support. |
Description:
When the
notify.telegramplatform went included in the componenttelegram_bot(used to send and receive messages), some users using the same Telegram account from multiple devices were abandoned... (See #8183).This is a dummy
telegram_botplatform for these users (and any user who doesn't need to receive any messages). It has the capacity of sending any type of Telegram message, but it cannot receive anything.Related issue (if applicable): fixes #8183
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#2882
Example entry for
configuration.yaml(if applicable):Checklist:
If user exposed functionality or configuration variables are added/changed: