Aqara Mini wirless switch (button) not registering

I have an automation to control my bedroom lights, the automation works no problem so I know that isn’t the problem,

I want to click the button on the device and it triggers the automation.
However, this doesn’t work, or works 1 in 100 times.

I have other aqara devices and they work fine (a motion sensor, water sensor, temp sensor, door sensor etc.) I only have 5-6 devices though so maybe the network isn’t strong enough?

It’s connected via Zigbee2MQTT

Why isn’t the button working properly to trigger the automation?

alias: Test Button
description: ""
triggers:
  - domain: mqtt
    device_id: 44be438654968f75a4382d5c7e43bd34
    type: action
    subtype: single
    trigger: device
conditions: []
actions:
  - action: script.hue_sunset_simulation
    metadata: {}
    data: {}
mode: single

All the devices you mentioned are end devices which do not route the ZigBee mesh.

Basically, all your devices will only speak to the coordinator directly. Your button must be far enough from the coordinator that it can only reach it once in a hundred times.

I suggest you read the excellent ZigBee guides on this forum and understand what is required to create a proper ZigBee mesh. Spoiler alert - you’re gonna need to buy some mains powered devices

Take a look at your Z2M map, especially the values displayed on the links between them - they show the quality of the link from your device to your controller.

I now have a much bigger mesh. I picked up ikea tradfri lights, but the aqara button is still unresponsive. I bought an ikea shortcut as well, same issue.

I can be in the next room, or same room, the buttons just don’t register.

I changed the config to turn off the lights in a room, stood in that room with the button and clicked it, took 62 times to turn them off.

At this point debating just paying for cloud and using voice, the buttons seem useless.

Take another look at your Z2M map.

Are the buttons you’re having trouble with connected to the coordinator or are they relaying through a router that’s closer to them?

You might be able to move the connection of the Aqara buttons from the coordinator to a router by briefly holding the pairing/reset button (1ish second) and check the map again.

If that doesn’t work, holding the pairing button for about 9s to disconnect/unpair the device and then holding it for the same amount of time again to reconnect the Aqara devices to the network might do the trick - in both cases the blue LED will have to blink several times; also make sure you have ‘Permit join’ enabled before you carry out the 2nd step and you do it from where the buttons most frquently/likely will be used.

If I remember properly how I set up my devices a long time ago, there could also be an issue with interference with your WiFi - don’t quote me on that, though.

I moved to channel 20 in the Settings - Advanced screen in Z2M in order to avoid these issues:

I had to re-pair all my devices but it’s been working fine since.