Disarming 2 partitions with one button

Did you get it to work?

Here’s what I did to get this:

To install card-mod, I used the manual technique (the automated way is via HACS but I don’t use it).

I copied this code into this file:

/config/www/card-mod/card-mod.js

Depending on which flavor of Home Assistant you have, the root directory may be different than /config. The general idea is to create a www directory within whatever is your configuration directory. I created yet another directory within www called card-mod but that’s optional and only because I want the card-mod plugin to be clearly separate from other plugins.

Once that’s done, there’s one more simple step.

  • Go to: Configuration > Lovelace Dashboards > Resources

  • If you don’t see that menu option, follow the instructions in the “manual technique” link above.

  • Click the Add Resource button and enter the path to the card-mod.js file. Be advised that /config/www is understood to be /local. Based on the path shown above, here’s what I entered in the URL field: /local/card-mod/card-mod.js?v=2.0.3

The version number tacked onto the end of the URL isn’t essential. It’s a convenience to help you remember what you installed. Whenever you replace card-mod.js with a newer version, you can update the URL’s ?v=X.X.X to reflect the new version number. This also has the benefit of instructing the browser that the plugin’s code is sourced from a “newer” URL.

At this point, you’re done with the installation of card-mod. Refresh your browser (Ctrl+F5) so that it incorporates card-mod.

If you have already edited your Alarm Panel Card with the changes you posted (specifically the style option) the card should display without a keypad (like in the screenshot I posted).

sweeeeet, that worked.

thanks for all the assistance, really appreciated.

G

Good post.
I’m with the same situation, I used your code and it’s ok for state if I work on the other two keypads (linked to partitions).
If I try to insert alarm from the new keypad the partitions state not changes.
The entity_ids are ok…

This is my yaml file:

alarm_control_panel:
  - platform: template
    panels:
      master_alarm_panel:
        value_template: >
          {% set p1 = states('alarm_control_panel.al_part_app') %}
          {% set p2 = states('alarm_control_panel.al_part_mon') %}
          {{ p1 if p1 == p2 else 'pending' }}
        arm_away:
          - service: alarm_control_panel.alarm_arm_away
            data:
              code: !secret alarm_code
              entity_id:
                - alarm_control_panel.al_part_app
                - alarm_control_panel.al_part_mon
        arm_home:
          - service: alarm_control_panel.alarm_arm_home
            data:
              code: !secret alarm_code
              entity_id:
                - alarm_control_panel.al_part_app
                - alarm_control_panel.al_part_mon
        arm_night:
          - service: alarm_control_panel.alarm_arm_night
            data:
              code: !secret alarm_code
              entity_id:
                - alarm_control_panel.al_part_app
                - alarm_control_panel.al_part_mon
        disarm:
          - service: alarm_control_panel.alarm_disarm
            data:
              code: !secret alarm_code
              entity_id:
                - alarm_control_panel.al_part_app
                - alarm_control_panel.al_part_mon

can you help me?

My apologies but I don’t understand what you mean by “insert alarm”. Do you mean that when you try to set the state of alarm_control_panel.master_alarm_panel to arm_home or arm_away it fails?

I confirm. When I try to set one of two states it fails.
thanks

Go to Developer Tools > Services and confirm that this works:

service: alarm_control_panel.alarm_arm_home
data:
  code: !secret alarm_code
  entity_id:
    - alarm_control_panel.al_part_app
    - alarm_control_panel.al_part_mon

Don’t forget to replace !secret alarm_code with your actual code because Developer Tools > Services doesn’t support the use of secrets.

You should be able to arm them this way. If you cannot then you need to fix that first.