Telegram config error

I’m new to home assistant and just finished my first configurations. I tried to add telegram today, but cannot get it to run.

my config:

Telegram

notify:

  • platform: telegram
    name: telegram
    chat_id: !secret telegram_bot_chatid

telegram_bot:

  • platform: polling
    api_key: !secret telegram_bot_api_key
    allowed_chat_ids:
    • !secret telegram_bot_chatid

If I check the the config I always get following error:
2017-07-31 22:20:35 ERROR (MainThread) [homeassistant.config] Invalid config for [telegram_bot]: required key not provided @ data[‘platform’]. Got None. (See /var/lib/hass/configuration.yaml, line 110). Please check the docs at https://home-assistant.io/components/telegram_bot/
2017-07-31 22:20:35 INFO (MainThread) [homeassistant.setup] Setting up telegram_bot

Failed config
telegram_bot:
- platform: polling
allowed_chat_ids: [source /var/lib/hass/configuration.yaml:113]
- …
api_key: …

I tested my bot key per URL - works fine - I write my own python script - works fine - I have really no idea what I’m doing wrong - based on all the entries in this forum seems that I’m doing the right thing. Also changing the logger to debug level doesn’t give more information.

Put ‘name’ on first line and ‘platform’ on the second.

notify:
  - name: NOTIFIER_NAME
    platform: telegram
    chat_id: USER_CHAT_ID

thanks for the quick response - just tested -> this doesn’t help :frowning: it seems to be a problem within telegram_bot instead of notify …

hmm… it looks like mine? I didn’t have my chat ID in my secrets file but did just move it and that didn’t make any difference?

Just make sure to check your spacing. yaml is pretty particular about it and can throw everything off.

telegram_bot:
  - platform: polling
    api_key: !secret telegram_bot_api_key
    allowed_chat_ids:
    - !secret bot_chat_id
1 Like

I solved the issue. I run Arch Linux on my Raspberry and installed home-assistant per AUR package. With this I always got this config error - today I installed home-assistant and appdaemon per pip and virtualenv and voala - everything works as expected.

Many thanks for your quick response - even if it did’nt identify the root cause :wink:

Ya. I’m a hack. It’s pretty amazing stuff works most of the time considering the bazillion lines of code floating around.

Good to hear you’ve got it going.