Create a virtual button to arm/disarm remotely AlarmSystem?

In apps.yam I defined a xiaomi wireless button to arm AlarmSystem…

  alarm_control_buttons:
    - binary_sensor.switch_xxxxxxxxxxxxx

Now I wish to create a virtual button in a group on the desk to arm or disarm AlarmSystem remotely.
How can I do it?

in apps.yaml you define settings for apps.
it might be helpfull to specify about what app you are using and where you have got it from.
and maybe, call the person who wrote that app?

I did it with scenes on mine. This scene also locks doors and closes the garage, but you could do it with just the alarm as well.

scene:

- name: Arm Stay
  entities:
    lock.front_door: locked
    lock.back_door: locked
    switch.garage: on
    alarm_control_panel.alarmcom: armed_home

I self solved the problem to create a virtual button to switch on and off my alarm

if you have installed System alarm, in Service panel you found two importand services:

  • alarm_control_panel.alarm_arm_home
  • alarm_control_panel.alarm_arm_away

so I created two input_boolean:

  systemalarm_home:
    name: System Alarm Home
    initial: off
    icon: mdi:alarm
  systemalarm_away:
    name: System Alarm Away
    initial: off
    icon: mdi:alarm

and two automation:

  - alias: system alarm home on
    trigger:
      - platform: state
        entity_id: input_boolean.systemalarm_home
        to: 'on'
    action:
      service: alarm_control_panel.alarm_arm_home
      data: {"entity_id":"alarm_control_panel.ha_alarm","code":"1234"}

  - alias: system alarm away on
    trigger:
      - platform: state
        entity_id: input_boolean.systemalarm_away
        to: 'on'
    action:
      service: alarm_control_panel.alarm_arm_away
      data: {"entity_id":"alarm_control_panel.ha_alarm","code":"1234"}

then in my Alarm group I’ve created the switches:

  alarm:
    name: Alarm
    entities:
      - alarm_control_panel.ha_alarm
      - input_boolean.systemalarm_home
      - input_boolean.systemalarm_away
1 Like