Inline_keyboard - how to change a state immediately

Hi folks,

I am trying to make an inline_keyboard to set a state of an entity (here input_selection) directly.

This code should show what I am trying to achive… I am trying to set input_select.alarm_lvl to debug

Telegram /xyz (ChatBot)

  • alias: Telegram_xyz
    description: auf /xyz ragieren
    trigger:
    • platform: event
      event_type:
      • telegram_command
      • telegram_callback
        event_data:
        command: /xyz
        condition:
        action:
    • service: notify.MYBOT
      data:
      message: ‘Alarm-Lvl setzen:’
      data:
      inline_keyboard:
      - 'debug:{%- set input_select.alarm_lvl = debug -%}, Infos & Alarm:/command2’
      - ‘nur Alarm:/command3, alles aus:/command4’
      mode: single

Any ideas?