Telegram Bot

Hello everyone, I’m starting to use HA and I’m really happy, it works wonderfully!

Now I’m trying to use the telegram bot to run the automations but I have some problems.
I have tried both the Polling method and Webhooks, but nothing changes, automation is not performed and I have the error below in the logs.

Configuration:

telegram_bot:
  - platform: polling
    api_key: !secret telegram_token
    parse_mod: html
    allowed_chat_ids:
      - !secret telegram_chatid

Automation:

  - alias: Telegram Bot 
    trigger:
      platform: event
      event_type: telegram_command
      event_data:
        command: '/hey'
    action:
     - service: notify.telegram
       data:
        message: Hey you

log:

Message with unknown data received: {'update_id': 257437138, 'channel_post': {'message_id': 92, 'chat': {'id': MYCHATID, 'title': 'NAMEOFGORUP', 'type': 'channel'}, 'date': 1526369706, 'text': '/hey', 'entities': [{'offset': 0, 'length': 4, 'type': 'bot_command'}]}}

I hope someone can help me!
Thx!

I just tested your automation. It works fine. Try to change the parse_mod: html to parse_mode: html

I corrected with “mode” but unfortunately does not change anything, same error in the logs…

You have to “chat” with your bot first. Simply send a message via Telegram App to enable the bot.
I had a similar issue in my setup, where the bot wouldn’t accept any commands unless I “talked” to him first (only once).