Template alarm: why does it ask for code to disarm?

Dear all:

I’m configuring the below template for Aqara Hub, the aim is to remove the unsupported modes. I added the hub via Homekit integration and those modes are incorrectly mapped so my idea is to create a template alarm control panel to hide them:

# Helper to hide the unsupported modes
- alarm_control_panel:
    - name: "Kitchen Aqara Hub Alarm"
      unique_id: "kitchen_aqarahub_alarm"
      state: >
        {% set source_state = states('alarm_control_panel.kitchen_aqarahub_alarm_raw') %}
        {% if source_state in ['armed_away', 'armed_home', 'armed_night', 'armed_vacation', 'armed_custom_bypass'] %}
          armed_away
        {% else %}
          disarmed
        {% endif %}
      code_arm_required: false
      arm_away:
        service: alarm_control_panel.alarm_arm_away
        target:
          entity_id: alarm_control_panel.kitchen_aqarahub_alarm_raw
      disarm:
        service: alarm_control_panel.alarm_disarm
        target:
          entity_id: alarm_control_panel.kitchen_aqarahub_alarm_raw

I have “code_arm_required: false” so it doesn’t ask for code when I arm, however when I disarm it always pops up to enter code, which I don’t have any. How to prevent the pop-up for disarming? code_disarm_required doesn’t exist…
Thank you!

Would you let anybody disarm an alarm without a code?
Yes, maybe arm it, but DISARM it?
Anybody, including an intruder? Yeah, naah.

Are you saying for disarming a code is mandatory?
Not that I disagree, but my Aqara hub is easy to disarm anyways, just pull the plug so code doesn’t make it more secure :slight_smile:
Also I just tested the alarm exposed by HomeKit and disarm doesn’t require code :technologist:

Makes a note to myself here: Do not use “Do-it-yourself” open source hobby code for real world security protection to keep your personal belongings safe. Keep that big Alsatian slightly hungry.

1 Like

Anyone knows how to disable the disarm code input?
My original entity does work without code, so not sure why wrapping it in a template forces it…