Problems with telegram bot integration and automations

Hi, I have made the integration of telegram bot, here is my code:

# Telegram
telegram_bot:
  - platform: polling
    api_key: 5XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX4
    url: https://xxxxxxxxxx:8080
    allowed_chat_ids: [-7XXXXXXX6,-7XXXXXXX8]

notify:
  - platform: telegram
    name: XXXXX_Mensajes_Normales
    chat_id: -7XXXXXXX6
  - platform: telegram
    name: XXXXX_Mennsajes_Urgentes
    chat_id: -7XXXXXXX8

Ok, so I have tried the telegram bot and works, but there is no way to get automation codes to work with telegram bot, here is my testing automation code in automation.yaml

      - alias: 'Telegram Te Dice Las Temperaturas'
    trigger:
      platform: event
      event_type: telegram_text
      event_data:
        text: 'temperatura salon'
    action:
    - service: telegram_bot.send_message
      data_template:
        target: --7XXXXXXX6
        message: 'Hay {{ sensor.temperatura_humedad_salon_temperatura }} ºC en el salon!' 

I suspect it can be the identation, but I’m a newbie in Python and yaml and I can’t see what I’m doing wrong and why it doesn’t working. Please, help, TIA

You dont state if your trigger is working or any info from the automations debug trace but try changing the action to the following:

    action:
    - service: telegram_bot.send_message
      data:
        target: 
        - 7XXXXXXX6
        message: 'Hay {{ sensor.temperatura_humedad_salon_temperatura }} ºC en el salon!' 

[/quote]

That solution does not work for me. Please HELP, I was making tests all weekend and nothing works

Please help

No one can help me? please…

I have done the setup in polling mode. Can it be a routers problem? I can’t do port forwarding to my raspi. I do my connection to HA throw nabucasa url. What can be wrong? Looks like my telegram bot listener service is dead. I can send any text to the channel, but my HAOS in my raspberry does not receive nothing from telegram. I don’t understand why. I have read the official documentation and done my configs exactly as the examples in doc but nothing… I can send from HAOS to telegram but telegram looks like is not connected to the chats…

Hi Yardo, did you find a solution? Who is the sender of your message that you are expecting the telegram_text event works?

I notice if I write with my personal user to the bot, the event works but if the message is sent by the same bot it doesn’t detect the telegram_text event.