Alarm Panel with Homematic Variable and virtual buttons

Hi,
I would like to create an Alarm Panel
I got already the function

  • 2 state (armed away, disarmed) related to the state from an HM Systemvariable

I cant find how I can setup:

  1. Panel Keypad only visible when Armed because only than I would Enter a code to disarm
  2. When the System is “armed” and I Enter the correct code the action = virtual Key HM-RCV-50 Chanel 24 short press
  3. When the System is “disarmed” and I select “arm away” the action = virtual Key HM-RCV-50 Chanel 26 short press
alarm_control_panel:
  - platform: template
    panels:
     safe_alarm_panel:
      name: Alarmanlage
      value_template: >
         {% if is_state('binary_sensor.ccu3_sv_sv_alarm_extern_scharf', 'on') %}
            {{'armed_away'}}
         {% else %}
            {{'disarmed'}}
         {% endif %}        
      arm_away:
          service: alarm_control_panel.alarm_turn_on
          target:
            entity_id: binary_sensor.ccu3_sv_sv_alarm_extern_scharf
      disarm:
          service: alarm_control_panel.alarm_turn_off
          target:
            entity_id: binary_sensor.ccu3_sv_sv_alarm_extern_scharf
          data:
           code: "1234"

Still it does not work that I press arm or disarm and a virtual Button on my Homematic CCU will be activated. How can I arrange that?
My actual code

alarm_control_panel:
  - platform: template
    panels:
     safe_alarm_panel:
      name: Alarmanlage
      value_template: >
         {% if is_state('binary_sensor.ccu3_sv_sv_alarm_extern_scharf', 'on') %}
            {{'armed_away'}}
         {% else %}
            {{'disarmed'}}
         {% endif %}        
      arm_away:
          service: automation.alarm_ausschalten_panel_druckt_virtuelle_taste_26
      disarm:
          service: automation.alarm_ausschalten_panel_druckt_virtuelle_taste_26
          data:
            code: 1234 alarm_code

What I need to write after service: ?
Right now it is the Entity ID from my Automatisierung which should press the virtual button. Right now I press arm or disarm and get Error "unable to find service automation …

Hi @SukramJ
it is related to your integration, are you able to give me a hint?

Please don’t tag me!
This is not related to ‘my’ integration, because this is a template.

You should think about what you will do in the service call, and that should be something like set_device_value on the virtual remote.