Notification setup withTelegram, "required key not provided"

Hi,
I tried to setup the notification via TELEGRAM.
I received my ID and API-key in the format as shown below (only some letters changed…).
My first setup has been according a tutorial video.
HA hasn’t been available after several tries, because it seems there is a difference between the syntax with direct ID & API-key input and (like in the video) referencing the secret.yaml file.

So with the following code at least HA is available via Web Interface.

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

telegram_bot:
  - platform: polling
    api_key: "10yyyyyy91:AAFl7yyyyKHY9pTyyyyyyyyk0EJEwMQqgKE"
    allowed_chat_ids:
     - 10xxxxxx82

notify:
  - name: HA_Message
    platform: telegram
    chat_ID: "10xxxxxx82"

But unfortunately the Service HA_Message is not available.

The errors shown in the log are:

2019-12-01 16:41:50 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: required key not provided @ data['trigger']. Got None. (See /config/configuration.yaml, line 13). Please check the docs at https://home-assistant.io/integrations/automation/
2019-12-01 16:41:51 ERROR (MainThread) [homeassistant.config] Invalid config for [notify.telegram]: required key not provided @ data['chat_id']. Got None. (See /config/configuration.yaml, line 24). Please check the docs at https://home-assistant.io/integrations/telegram/
2019-12-01 16:41:53 ERROR (SyncWorker_15) [homeassistant.components.ios.notify] The notify.ios platform was loaded but no devices exist! Please check the documentation at https://home-assistant.io/ecosystem/ios/notifications/ for more information
2019-12-01 16:43:58 WARNING (zeroconf-ServiceBrowser__esphomelib._tcp.local.) [zeroconf] Exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/zeroconf.py", line 2245, in send
    bytes_sent = s.sendto(packet, 0, (addr, port))
PermissionError: [Errno 1] Operation not permitted
2019-12-01 17:02:38 WARNING (updater) [telegram.vendor.ptb_urllib3.urllib3.connectionpool] Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x7184ddd0>: Failed to establish a new connection: [Errno -3] Try again')': /bot10yyyyyy91:AAFl7yyyyKHY9pTyyyyyyyyk0EJEwMQqgKE/getUpdates
2019-12-01 17:02:43 WARNING (updater) [telegram.vendor.ptb_urllib3.urllib3.connectionpool] Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by ....

Maybe anybody has idea what’s wrong here?

Best regards,
Jörg

Start with the first item in the log and fix it?

Thanks for your post @flamingm0e,
but honestly I do not see, where a problem should be in the automation config…?
I have only changed the configuration.yaml.
How do these files (configuration.yaml and automation.yaml ) interact?
I have no automation running yet. The system is almost new setup with only some aqara sensors connected via Conbee 2.

And 2nd message, that the notify telegram key is invalid, I assume that still some syntax is wrong…?? Maybe quotation marks, where they shouldn’t be and vice versa…

For item 1 , can you give me a hint , what to look for?
I have to admit, that I still within my 1st steps in HA.

Regards
Jörg

It looks like you have a broken automation - one you didn’t share with us. You need to fix that automation.

1 Like

Files referenced in configuration.yaml get loaded in line.

For instance, if you have automations: !include automations.yaml in your configuration, it loads the entirety of the automations files into configuration, in that section.

You may not have ANYTHING wrong with Telegram. Your configuration is failing to load, because it thinks you have a problem with automations. Always ignore the LAST error and fix the FIRST error first.

1 Like

Regarding the second error, chat_ID needs to be chat_id

2 Likes

OK,
the last 3 replies include the solutions for 2 faults. Thanks!
There has been an automation saved in automation.yaml, due to a test service call included in the video tutorial.
And - true - I changed the id spelling with small characters.

It is running now.
Thanks!