Hello,
right now i’m working on a Telegram Bot with HA, which will reply to my Telegram inquiries and offer me several options in controlling the different tech i got at home.
Fortunately this works without any hiccups and i’m happy with the results, BUT after implementing those countless automation-scripts i now would like to implement the same menu-structure of the telegram bot also for my wifes telegram account, without duplicating all of the script-code for her telegram instance.
Is there an easy way in YAML to implement a menu structure, in which the telegram bot just replies to that (known) telegram chat-id which talked to it in the first place with /start?
This is my current /start-code which is working with the “service” and my telegram-notifier (my account). If i’m inserting a notify-group with both of our chat ids, both of us gets the response every time one of us is talking to the telegram bot.
- alias: 1000-TBot-startmenu
trigger:
platform: event
event_type: telegram_command
event_data:
command: /start
action:
- service: notify.telegram_Chris
data:
message: '-=Homeassistant Control Panel=-
’
data:
inline_keyboard:
- Hausstatus:/status, Verwaltung:/mgmt, Sicherheit:/security
- Meldungen:/log
…
I only want the telegram instance to talk to the initiator, so both of us (my wife and i) can talk to the bot, without having to implement the scriptcode twice.
Any ideas are greatly appreciated.
Thanks in advance and best wishes