Notify - Telegram

Hi Guys,

I am stuck with the notification feature since last 3 days. Tired everything I could. Below is my code and also the log output.

Configuration.yaml

   telegram_bot:
  - platform: polling
    api_key: !secret Telegram_Api
    allowed_chat_ids:
        - !secret Telegram_Chat_Id

and within notify.yaml:

- platform: telegram
  name: telegram
  chat_id: !secret Telegram_Chat_Id

script.yaml:

test_telegram:
  alias: test_telegram
  sequence:
- service: notify_telegram
  data:
    title: Test Message
    message: 'This is a test!'

I have also tried adding “” for the message and get same error.

I have also validated above with online YAML validator.

Logs:

WARNING (MainThread) [homeassistant.core] Unable to find service notify/telegram
WARNING (MainThread) [homeassistant.core] Unable to find service notify/telegram

Edit: forgot to mention I am on Hassio installation.

I would really appreciate your help.

Thanks,
RT

It might pass lint but unless you have incorrectly pasted it the indentation is off…

Config…

telegram_bot:
  - platform: polling
    name: telegram
    api_key: !secret telegram_api_key
    allowed_chat_ids:
      - xxxxxxxxx

notify:
  - name: ha_telegram
    platform: telegram
    chat_id: xxxxxxxxx

Mines in automation…

- service: notify.ha_telegram <----- note the "." and the name so as not to confuse myself ;P 
  data:
    title: Test Message
    message: 'This is a test!'
Thanks for your quick reply @keithh666. After posting this thread, I tried using the hassio inbuild script option and it spit out below configuration. 

'1513307752282':
  alias: Telegram
  sequence:
  - data:
      message: This is a test!
      title: New message
    service: notify.telegram


Even after that, it gives me same error as shown below.

2017-12-15 14:16:09 WARNING (MainThread) [homeassistant.core] Unable to find service notify/telegram 
2017-12-15 14:16:22 WARNING (MainThread) [homeassistant.core] Unable to find service notify/telegram

Thanks,
RT

That’s probably because telegram_bot is incorrectly formatted?

Hi @keithh666,

Here is what I have in configuration.yaml. I thought I would add image as I wasn’t sure if out we have in forum will be same.

image

Thanks,
RT

OK, that looks ok now, did you restart HA? After each config change you have to restart HA. However always do a config check before restarting - not so relevant for normal HA but is very relevant for Hass.io :slight_smile:

This one :stuck_out_tongue:

Ahh, I use to reload core and all the options they have there. I will try reloading the HA to see if that works.

Thanks mate. Will update you soon.

Cheers.

@keithh666 mate, you are a legend. It working now. Restart is what was needed.

Thanks a lot. :slight_smile:

Glad you got it going :slight_smile: Please mark it as solved so the next happy customer can find it :slight_smile:

Errrm the solution was to restart ?

Errm it’s the 5th message up from here :stuck_out_tongue: