Xiaomi Button No longer registers single or double press!

Tags: #<Tag:0x00007f47fc656878>


I have two of these buttons linked to a xiaomi aqara hub. everything has worked for ~1 year. But now all of a sudden, both buttons stopped working. When I view their dev_state, i see that single and double presses are not registered. However, long presses and ‘hold are’.

When i go into the xiaomi app to view the buttons, the presses are correctly recorded as single / double press / etc.

I am not sure what changed - home assistant, the buttons, or the xiaomi integration. Has anyone else seen this change?

thank you!


Did you update to 0.83? There was a breaking change related to the buttons. Check release notes (event type changed)


Have a look here:

You need to change the following events:

motion -> xiaomi_aqara.motion
click -> xiaomi_aqara.click
cube_action -> xiaomi_aqara.cube_action


I think what you quoted here are the changes to the name of the events. The OP is referring to the state of the xiaomi button on the dev-state page. I am experiencing the same after updating from 0.82.1 to 0.83.3. The state (and last_action) of the xiaomi button on the dev-state page only changes when I long click and hold the button. Single or double click on the xiaomi button is no longer recognized or recorded on the dev-state page, and therefore not possible to trigger any automation.


Yes Valsily - you hit the nail on the head. Glad to hear I am not the only one!

This has broken my automation.
I bet it is still related to the change to events referenced above. Not sure when 0.83 came out, but this affected me within the last ~2 weeks. I am on a docker, which updates automatically.

If no one has any other ideas, I’ll return later and share my automation



Mine broke too, when I changed form Hass.io to HA in Docker and thus to 0.83.3.


Mine does not show any event either, but the events are still recognized (so all button clicks work). The event is only missing on the dev-state page


Then it is different here on my side. On my Hass.io, single/double click is neither captured on dev-state page nor able to trigger automation. I have updated the event_type names in automations.yaml.

One proof is when I change click_type from single to long_click_press, which is the only type that is captured, the automation works again.

I reported this to a possibly-related issue on Github but have not heard any responses yet.


Seeing this issue as well. None of my buttons are working and sensor triggered automation’s are intermediate.

Latest version of HA.


Submitted a new issue on Github for this:


@syssi Any idea why that is happening?


@Zoker Which issue do you mean in detail? It looks like every user is talking about a different issue. :wink:


@syssi Yea right :smiley:

So for me in the dev-state page the last action field does not get updates. So when I do a double click (which is recolonized correctly within my HA, because the automation is triggered) the last action does still show last action: single

This happens since the last update


You are right. I could reproduce the issue (on 0.82.1), too.


By following these instructions, I have fixed the automation.
Below, in my automation.yaml, i had event_type: click
I changed it to event_type: xiaomi_aqara.click, reloaded automations, and all works again.
seems like there is indeed some cleanup to be done on the dev_states though. Thanks to everyone

- alias: "Switch livingroom light scene with clicker"
    platform: event
    **event_type: xiaomi_aqara.click**
      entity_id: binary_sensor.switch_158d0002377b74
      click_type: single
     - service: input_select.select_next
       entity_id: input_select.living_room_scenes
     - service: scene.turn_on
         entity_id: scene.{{ states.input_select.living_room_scenes.state }}


cp. https://github.com/home-assistant/home-assistant/pull/17354


Your issue will be fixed by: https://github.com/home-assistant/home-assistant/pull/19102


Amazing! Thank you


@syssi I just updated my automations.yaml again to revert click_type from long_click_press to single and now it works, without explanation.

Guess it is some sort of coincidence but still glad to know that the dev-state not updating issue is getting a fix. I will update the issue on Github.

Much appreciated.


@syssi So since update to 0.84.0b4 (and also the stable release 0.84.1) the buttons seem to be broken again. So no last_action updates and no automation triggers

I can see the action working on the gateway, but not in HA.
Tested devices:

  • Button 1st generation
  • Button 2nd generation
  • Aqara Wireless Switch (Single)
  • Aqara Wireless Switch (Double)

All those are not working anymore.

Here is one of my automations:

- id: lighting_all_switch
  alias: '[Licht] Alle Schalter'
  - event_data:
      click_type: both
      entity_id: binary_sensor.wall_switch_both
    event_type: xiaomi_aqara.click
    platform: event
  - event_data:
      click_type: single
      entity_id: binary_sensor.wall_switch
    event_type: xiaomi_aqara.click
    platform: event
  - event_data:
      click_type: single
      entity_id: binary_sensor.switch
    event_type: xiaomi_aqara.click
    platform: event
  - event_data:
      click_type: single
      entity_id: binary_sensor.switch_2
    event_type: xiaomi_aqara.click
    platform: event
  - data:
      entity_id: group.licht
    service: light.toggle

Here are the buttons in the dev-state page:

My system:

  • HassOS 1.13
  • Hass.io supervisor 141
  • HA 0.84.1
  • Raspberry Pi 3 Model B+

If you need more information or anything I can test, please let me know.


In the logs I see this:

But all other aqara sensors are working (door, temperature, motion etc.)

I also tried to reset the gateway and re-add it, but still the same issue

Edit 2:

The only way I get the last_action not display anything different then null is to hammer on the switches. Then the gateway says something like “positive connection” (in chinese) and the last_action changes to single. But the automation is still not triggered…

For the round aqara button the hold seems to work (and also the long_click_press which is triggered during the hold)