8000 If you define multiple telegram_bots messages are sent to the wrong chat · Issue #138413 · home-assistant/core · GitHub
[go: up one dir, main page]

Skip to content
If you define multiple telegram_bots messages are sent to the wrong chat #138413
@olivluca

Description

@olivluca

The problem

I defined two telegram bots in configuration.yaml

telegram_bot:
  - platform: broadcast
    api_key: "49...."
    allowed_chat_ids:
      - -30...   
  - platform: broadcast
    api_key: "53...."
    allowed_chat_ids:
      - 23...   

and the corresponding notifiers

notify:
  - platform: telegram
    name: "citofono"
    chat_id: -30...
  - platform: telegram
    name: "furgo"
    chat_id: 23...

There is no warning or error message in the log indicating that the configuration is wrong, but if I try to send a message using the first notifier the messages are sent to the wrong chat , in fact I see this warning in the log:
WARNING (MainThread) [homeassistant.components.telegram_bot] Disallowed targets: [-30...], using default: 23...

What version of Home Assistant Core has the issue?

core-2025.1.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

telegram_bot

Link to integration documentation on our website

https://www.home-assistant.io/integrations/telegram/

Diagnostics information

No response

Example YAML snippet

Anything in the logs that might be useful for us?

Additional information

I'm not sure if the bug is in the the telegram integration that should find a telegram_bot based on the chat_id or it should be done by the telegram_bot integration.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0