Call disarm service takes long time

I have problems when disarming Alarmo. Both when using the common disarm service and the specific alarmo disarm service it takes 3-4 seconds until it is actually disarmed. I don’t have any other issues with HA being slow. Have just used HA for a couple of months and think I have had the issue the whole time.

What’s those 4 sekunder (seconds) later?

alias: Keypaden - Avlarma från keypaden
trigger:
  - platform: mqtt
    topic: zigbee2mqtt/Keypaden
condition:
  - condition: template
    value_template: '{{ trigger.payload_json.action == ''disarm'' }}'
  - condition: or
    conditions:
      - condition: state
        entity_id: alarm_control_panel.master
        state: armed_custom_bypass
      - condition: state
        entity_id: alarm_control_panel.master
        state: armed_away
      - condition: state
        entity_id: alarm_control_panel.master
        state: triggered
      - condition: state
        entity_id: alarm_control_panel.master
        state: arming
      - condition: state
        entity_id: alarm_control_panel.master
        state: armed_night
      - condition: state
        entity_id: alarm_control_panel.master
        state: pending
action:
  - service: alarmo.disarm
    data:
      entity_id: alarm_control_panel.master
      code: '{{ trigger.payload_json.action_code }}'
mode: single

I’ve got some automation triggered by the alarm being disarmed, so those extra three seconds are disturbing. Any suggestions how to solve it?

HA 2021.6.5

I know this is ancient, but I found this because I’m running into the same issue.

I believe this is due to the way Alarmo checks the code against its user database, and happens when there is a large(ish) amount of users/codes defined.