I have an Aqara mini switch in HA via the Hubitat Integration. When creating an automation I can only see button 1. Not sure if this is due to the Hubitat Integration. I tried one Aqara button blueprint and had no luck with that, so I thought I’d try it directly.
Oh! I was expecting to see a button for each press. My dumb mistake.
On another note, I don’t see how to access the button presses using an entity.
You should have an event entity for the button.
event.button_1
This will change state depending on how many times it is pressed.
There’s a blueprint for this you could use: ZHA Aqara Button (press, double press, hold actions)
For Zigbee2MQTT the entity ‘option’ went away a while ago.
I had to change all of my Aqara Buttons over to MQTT triggers, e.g.
triggers:
- trigger: mqtt
topic: zigbee2mqtt/XA_BTN_03/action
payload: single
or:
payload: double
payload: triple
payload: quadruple
No it didn’t. This is an Aqara button connected via Z2M using the new format:
- id: 23cd99f6-6054-43cc-9fbe-a89570fb0bfa
alias: Master Bed Button Events
triggers:
- trigger: state
entity_id: event.master_bed_button_action # <- NEW ENTITY
to: ~
conditions:
- condition: template
value_template: "{{trigger.from_state.state != 'unavailable'}}"
actions:
- choose:
- conditions:
The legacy format still uses an entity too. e.g. sensor.master_bed_button_action.
All that changed was the domain. sensor... entity → event... entity
Sorry!
You’re right - I remember now.
I might’ve gotten all confused with that domain change - and the fact that I would’ve needed to add the condition.
conditions:
- condition: template
value_template: "{{trigger.from_state.state != 'unavailable'}}"
Thanks for the info. I’ll try that Blueprint as well.
I tried the blueprint you suggested but it does not see ANY devices:
Keep in mind all of my devices are currently added to HA using the Hubitat Integration. So I’m somewhat skeptical of their functionality.
You’ll have to ask in the blueprint topic.
I kinda gave up on the whole concept of Entities and Devices for battery powered buttons (In my case I use MOES Scene Switches). Instead I changed to using the hardware id’s of the switches, per the linked thread.
Currently I have a single automation that handles all button presses (maps the id’s to logical names). Then a single script which uses the logical names to take the relevant actions (most of which are just activating scenes).
TBF, It doesn’t really solve your problem, instead it eliminates the need to solve it.


