Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- so my configuration.yaml has:
- telegram_bot:
- - platform: polling
- api_key: XXXXXXXXXX:XXXXXXXXXXXXXXXXXXXX # your Telegram API key
- allowed_chat_ids:
- - XXXXXXXXXX # bot ID
- - -XXXXXXXXX # group chat ID
- - XXXXXXXX # chat ID between me and the bot (no group)
- - -XXXXXXXXX # Sonarr group chat ID
- notify:
- - name: XXXXXXXXXX # your Telegram username without the @
- platform: telegram
- api_key: XXXXXXXXXX:XXXXXXXXXXXXXXXXXXXX # your Telegram API key
- chat_id: XXXXXXXX # chat ID between me and the bot (no group)
- Then the automation that listens for a Telegram command in a group (or any chat for that matter, I don't know how to filter it to one chat/group chat, is:
- alias: Scan Plex TV Shows
- description: ''
- trigger:
- - platform: event
- event_data:
- command: /scan
- event_type: telegram_command
- context: {}
- condition: []
- action:
- - service: rest_command.scan_plex_tv_shows
- - service: telegram_bot.send_message
- data:
- target: -XXXXXXXXX # Sonarr group chat ID
- message: Plex TV Shows scan started mode: single
- So even if I text /scan to any chat or group chat where the bot is, HA grabs it, does the thing, but replies "Plex TV Shows scan started" to the specific Sonarr group chat. Multiple ways in (command), one way out (reply).
- Make sure your bot settings in Telegram (botfather) are all okay and open at least for the setup (group, privacy, etc) and that you talk to the bot for the first time (in groups and directly) since bots aren't allowed to start conversations
- Try it and go from there? Good luck
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement