Alarm Panel Service

I am using an alarmdecoder alarm panel and everything is working in the lovelace front end, however when I try to call the alarm_control_panel.alarm_arm_home service it does nothing.

Ultimately I am trying to put the arming of the panel into a script. But I cant even get it to set with calling the service.

This is the script I am trying to use and it seems to do nothing as well. The only way I can arm it is if I use the lovlace card

arm_panel_home:
  alias: "Arm Panel Home"
  sequence:
   - service: alarm_control_panel.alarm_arm_home
     data:
        entity_id:  alarm_control_panel.alarm_panel
        code: !secret alarm_code

I’ve been told this is wrong, however if I change it to what people on here suggest it crashes my GUI… so what I have which does work (modified for your version):

arm_panel_home:
  alias: "Arm Panel Home"
  sequence:
   - service: alarm_control_panel.alarm_arm_home
     data:
        entity_id:  all
        code: !secret alarm_code

So all I changed is the entity_id, to ‘all’. As I said I was told this is wrong by forum members but if I try using 'alarm_control_panel.alarm_panel', my system passes the config check but the GUI crashes (only when viewing remotely for some reason). Give it a try and see if it works for you…

I appreciate it.
It looks like if I put my code in quotations it works.

What exactly does this mean:

It looks like if I put my code in quotations it works.

I have baffling behavior with the entity_id in my usage of this service call see home-assistant/issues/28633, but maybe what you have uncovered is a piece of this interconnecting puzzle.

so the above code from above without using the secrets file would look like this:

arm_panel_home:
  alias: "Arm Panel Home"
  sequence:
   - service: alarm_control_panel.alarm_arm_home
     data:
        entity_id:  alarm_control_panel.alarm_panel
        code: '1234'

where you see I’ve put the 1234 in ‘quotes’