Hi
I’m trying to get callback from my telegram bot to trigger actions in HA but it didn’t work.
I have HA running externally with Cloudflare.
My first configuration.yaml looks like this for webhooks :
# Telegram Bot
telegram_bot:
# - platform: polling
- platform: webhooks
#url: https://....:8123
api_key: !secret telegram_token
parse_mode: html
#trusted_networks:
# - 149.154.160.0/20
# - 91.108.4.0/22
allowed_chat_ids:
- !secret id_telegram_furya
- !secret id_telegram_maison
- !secret id_telegram_alert
I can send notification with buttons with a first automation :
- action: telegram_bot.send_message
metadata: {}
data:
message: >-
XXXX à réclamer les points pour s’être brosser les dents ce matin ! La
récompense doit-elle être validée ?
title: ✅ Tâches
inline_keyboard: Oui:/oui, Non:/non
Then I try to trigger another action with this second automation :
alias: New automation
description: ""
triggers:
- trigger: event
event_type: telegram_callback
event_data:
command: /non
conditions: []
actions:
- action: telegram_bot.send_message
metadata: {}
data:
message: Disapprove
mode: single
But nothing happen.
I tried to remove the command for the url / trusted network on configuration.yaml but every time telegram didn’t work anymore.
I tried with polling method but no more luck.
Any idea how to make this working ?
Thanks