Xiaomi Square Aqara Button / wireless switch trouble

Hi All,

I’ve just gotten one of the (1st Gen?) small square Zigbee Xiaomi button switches in and for some reason, clicks aren’t registering with HA. Both single and double clicks are being passed to the Mi App on my iPhone without fail.

I’m currently running 0.62.1 with a number of other Xiaomi sensors, round buttons, plugs etc.
Was also not working on 0.61.1.

Any tips?

Cheers,

Lint

Why do you htink a clicks isn’t registered? It’s delivered as event:

It’s a round button or a squared one?

Hey @syssi,

It’s a small squared one with a centre rounded button.
image

I know clicks are not being passed to HA because while it shows up as a device, when you view its history it’s last state is always -

If I attach an automation that works on the rounded version there is no response.

Just odd really

The State is not supposed to change when you click on the button. Use events as @syssi said

This is a button of the 2gen. The long press isn’t supported. The spacing between click one and click two of a double click must be pretty long (>0.7sec).

I use one of these buttons to trigger a doorbell. This is an extract from the automation created using the automation editor which works fine:

  trigger:
  - event_data:
      entity_id: binary_sensor.switch_158d0001b8f6d9
    event_type: click
    platform: event