Heyhey
Actually Im playing with telegram commands and inline keyboard stuff.
I created two automatisations for this. But I wonder how I send the Telegram Bot message to the ID the query came from:
alias: Telegram Bot Kommand auto
description: gibt Telegram Nachricht aus, wenn das command /auto gesendet wird
trigger:
- platform: event
event_type: telegram_command
event_data:
command: /auto
condition: []
action:
- service: telegram_bot.send_message
data:
inline_keyboard:
- Klima starten:/autoklima
title: Ingeborg bereit
message: >-
Der Akkustand beträgt: {{
states('sensor.ingeborg_remaining_battery_percent')|round(0)}} %
Das reicht für: {{
states('sensor.ingeborg_remaining_range_electric')|round(0)}} km
Aktuell wird geladen mit: {{
states('sensor.keba_p30_charging_power')|round(0)}} Watt
mode: single
alias: Telegram Bot Callback Autoklimatisierien
description: Startet Ingeborg Klimatisierung nach Telegram Bot Callback Query
trigger:
- platform: event
event_type: telegram_callback
event_data:
command: /autoklima
condition: []
action:
- device_id: 6df5b5d22534029abd29840c9da2849d
domain: button
entity_id: button.ingeborg_activate_air_conditioning
type: press
- service: telegram_bot.answer_callback_query
data:
show_alert: false
callback_query_id: " {{ trigger.event.data.id }} "
message: OK Klimaanlage wird eingeschaltet.
mode: single
I got two Telegram Ids connected with my bot. Doesnt matter which ID sends the /auto command to the bot, always the first ID gets the answer. How to select which ID the command came from?