mp3llll
(Mp3llll)
November 17, 2017, 9:56pm
1
Hey,
I’m trying to add to my sensor.motion to send notifications via telegram.
i get an error .
message: The following components and platforms could not be set up:
Please check your config.
title: Invalid config
I add it like this to my configuration.yaml
Still not working. what i miss here?
notify:
- platform: telegram
name: TelegramBot
api_key: 442863440:AAGbI-qkesadsUBY2GY-DpZddsUM
chat_id: 285733235
refer to the telegram instructions webhooks or polling .
I use polling and my configuration.yaml has
telegram_bot:
- platform: polling
api_key: !secret telegram_bot_api_key
allowed_chat_ids:
- !secret telegram_chat
and then I’ve got a
notify:
- name: telegram
platform: telegram
chat_id: !secret telegram_chat
mp3llll
(Mp3llll)
November 17, 2017, 10:07pm
3
i refer still not working for me…
updated my post above - you need two things - define the telegram_bot and also define the notify component to use that bot
mp3llll
(Mp3llll)
November 17, 2017, 10:23pm
5
Yes, i did it and that work.
so need to use polling only and not telegram
Those are two different methods for using telegram. You need to configure the bot with one platform or the other if you want to be able to do two way communication. I chose polling but you can use webhooks as well. Once you define the ‘bot’ in the configuration file you can then use the telegram platform for notifications.
1 Like