When I add it to my homeassistant using Aqara Gateway Integration, it doesn’t give me the action types it is only showing On/Off and battery level change in automations. (as shown in the image below)
Hello, I’m working on a similar item and am currently drafting an blueprint to address a related issue. I to have this button hooked up through the Aqara gateway. I then have it published to HA through Matter.
The blueprint you are using is assuming you have it published to HA via ZHA. I am not sure that you can do that with the Aqara hub. This is what I feel is leading to the mismatch you show above.
I have gotten some data using the event monitor and have rigged up an automation by hand that fires.
The data from the Monitor:
I latched on the the event_type of multi_press_complete and the totalNumberOfPressesCounted to get responsed to both single and double presses. It isn’t pretty and is very much me stumbling around in the dark. Here is the automation:
Here are things roughed in without any testing. I’m sure there are plenty of things to fix to make it work. I had hoped to at least rough out the structure and logic. Only accounts for completed sequences as it is based off the multi_press_complete state change.
First attempt sloggin thought this. Don’t laugh too loudly. Thank you!
blueprint:
name: Matter - Aqara Wireless Mini Switch
description: Automate your Aqara Wireless Mini Switch when run via Matter
author: EFH52
domain: automation
input:
target_switch:
name: Aqara Wireless Mini Switch
description: Target Aqara Wireless Mini Switch to monitor
selector:
entity:
integration: matter
model: Aqara Wireless Mini Switch
short_release_action:
name: Short Press Complete
description: Action to take when Short Press is completed
default: []
selector:
action: {}
long_release_action:
name: Long Press Complete
description: Action to take when Long Press is completed
default: []
selector:
action: {}
two_release_action:
name: Double Press Complete
description: Action to take when Double Press is completed
default: []
selector:
action: {}
three_release_action:
name: Triple Press Complete
description: Action to take when Triple Press is completed
default: []
selector:
action: {}
four_release_action:
name: Quadruple Press Complete
description: Action to take when Quadruple Press is completed
default: []
selector:
action: {}
mode: restart
max_exceeded: silent
trigger:
platform: state
entity_id: !input target_switch
action:
- variables:
- command: "{{ trigger.to_state.attributes.event_type }}"
- presses: "{{ trigger.to_state.attributes.totalNumberOfPressesCounted }}"
- sequence:
- condition: "{{ command == 'multi_press_complete' }}"
sequence:
- choose:
- condition: "{{ presses == 1 }}"
sequence:
- choose:
- condition: "{{ command == 'short_release' }}"
sequence: !input short_release_action
- condition: "{{ command == 'long_release' }}"
sequence: !input long_release_action
- condition: "{{ presses == 2 }}"
sequence: !input two_press
- condition: "{{ presses == 3 }}"
sequence: !input three_press
- condition: "{{ presses == 4 }}"
sequence: !input four_press