I just added an Aqara button via ZHA integration but I am not seeing an entity for the sensor other than the battery level. What am I overlooking?
Added Aqara button to my setup but only seeing the battery entity. How do I view the button presses?
Those are going to come over the event bus.
The only way to interact with them is with an automation really.
Open up the developer tools, on the far right click the ‘events’ tab and in the bottom of the page, try entering: xiaomi_aqara.click
for the event type and click ‘start listening’. Now go push the button and see if anything shows up.
Or the event type might be zha_events
since you’re using ZHA.
One of those lol.
To interact with it, you’d create an automation that now listens for those events and does things.
Thank you for the response. I tried both zha_events and xiami_aqara.click and nothing came up when i listened for those events.
Thoughts?
I tried re-pairing the button and in the ZHA logs it looks like it is registering something whenever I click the button.
It’s zha_event
not zha_events
.
If you select the device in an automation trigger it also displays the click event.
Did you manage to resolve the problem? Mine button also does not expose a sensor entity and is not firing neither zha_event
nor xiaomi_aqara.click
events. Removing and re-pairing does not help.
Yes I did. Did the battery show up for you when you re-paired it? If not I can’t really speak to that as that may be a hardware issue. While pairing what I did was once I started the ZHA integration I basically just repeatedly pressed the sync button on the aqara device until I saw that HA could at least access the button’s power. Once I got the button paired I tested using Developer Tools > Listen to: “zha_event”
OK, clear. One of my buttons worked like that from the start but the other one I had to remove, reset to factory defaults and re-add. Works ok now.
In the mean time I’ve also found that there won’t be an entity to represent status of the button and you can easily add the triggers directly in the automations, this makes it much easier: