Automation unreliable execution with aqara mini switch

I’m doing my first steps in creating automations. I’d like to use the aqara mini switch for TV control (Vol +/- , Play/Pause) using its 3 events: single press, double press, long press.
The device is connected over matter and events are reliably recognized.

However my automation is not triggered on every event. It is triggered very unreliably. Any suggestions why that might be?

Please don’t share pictures of text. Share the text correctly formatted for the forum using the </> button in the post toollbar (it is under the cog menu on small screens).

As to your issue, this is how I reliably use the same button using zigbee2mqtt:

- id: 4239ed5b-2f54-4afe-a112-f6a0be1c9389
  alias: Spare Bed Button Events
  triggers:
  - trigger: state
    entity_id: event.spare_bed_button_action
    to: ~
  conditions:
  - condition: template
    value_template: "{{trigger.from_state.state != 'unavailable'}}"
  actions:
  - choose:
    - conditions:
      - condition: template
        value_template: "{{trigger.to_state.attributes.event_type == 'single'}}"
      sequence:
      - action: light.toggle
        target:
          entity_id: 
          - light.lifx_sp_bed_lamp_left
          - light.lifx_sp_bed_lamp_right
      - action: lifx.set_state
        entity_id: 
        - light.lifx_sp_bed_lamp_left
        - light.lifx_sp_bed_lamp_right
        data:
          brightness: "{{ states('sensor.calculated_light_brightness_25pct_min')|int(0) }}"
          color_temp_kelvin: 2700
    - conditions:
      - condition: template
        value_template: "{{trigger.to_state.attributes.event_type == 'double'}}"
      sequence:
      - action: script.spare_bed_close
    - conditions:
      - condition: template
        value_template: "{{trigger.to_state.attributes.event_type == 'triple'}}"
      sequence:
      - action: script.spare_bed_open
    - conditions:
      - condition: template
        value_template: "{{trigger.to_state.attributes.event_type == 'hold'}}"
      sequence:
      - action: script.spare_bed_favourite