Hi all,
In short, I am looking to trigger an automation using my aqara wireless remote switch H1 (WRS-RO2). A very basic automation (or so I assumed), press one of the buttons once - toggle the lights on/off.
An event is logged every time the button is pressed, without fail.The below is the event that is registered when the button is pressed once;
event_type: state_changed
data:
entity_id: event.aqara_wireless_remote_switch_button_2
old_state:
entity_id: event.aqara_wireless_remote_switch_button_2
attributes:
event_types:
- multi_press_1
- multi_press_2
- long_press
- long_release
event_type: multi_press_1
previousPosition: 1
totalNumberOfPressesCounted: 1
So setting up a simple automation trigger like the below I assumed this would work.
Unfortunately, it did not trigger every time… not so simple. So after a bit of investigation I can see the device state will always be maintained. So the automation does trigger If the prior state is different. So if I change the state by say doing a double press first, followed by a a single press the automation triggers. Ok I thought, the automation needs a state change or I need a trigger that works on repeat events.
This is where I have been for a couple days now. I’ve tried all sorts of trigger type combinations to no success. I’m very new to HA and still getting my head around how everything works so apologies in advance if this question is pretty basic. I’ve had a good search of the forum and can’t quite see topics which cover my case. As most related to aqara are using them through a separate zigbee controller. All and any help is greatly appreciated.
For some more context;
The switch is connected via a Aqara hub Cluster - M3 as master, M2 child that the switch is linked to. Both bridges are integrated into HA through matter. I’m doing it this way as I invested in the Aqara products a while ago and over a few years through homekit. They work great that way, but I also have a lot of other smart devices accumulated over the years. So I took the plunge into HA with the hope of having a one stop shop for everything to save the annoyance of multiple apps to control. Loving HA so far but this one has me scratching my head an I have a bunch of these switches. I can still use them through the Aqara app but would love if I could get this to work in HA so I can open up there use with non-aqara devices.