Aqara wall switch - Trying to setup on / off functionality AND changing scenes

Hello,

I have one of these Aqara wall switches

I’ve set this up in HA with ZHA, and it appears like this:

This lists lots of triggers:

One of the switches is wired to a physical light. The other switch is configured to turn on and off some smart bulbs. This works great.

What I’d like to do, though, is:

  • Press button to turn on / off bulb
  • Double press / hold (just some other action) the same button to change scene

From what I can tell, this isn’t possible, as any press will either turn the switch on or off.

Is there some way of achieving what I’d like?

Thanks!

I think you need to set it to decoupled mode, but in your screen shot I don’t see that setting anywhere.

You might want to unpair it and re-pair it again as the Unknown values seem to indicate that it didn’t have a successful interview. AFAIK, all of the Aqara rockers support decoupled mode.

From having a look, the suggestion is decoupled mode is only in zigbee2mqtt.

I’m running ZHA.

I was afraid of that. I was looking through Blakadder to see if there was a way to flip that from ZHA. The best I can figure would be to send a command to the cluster directly (or use the manage clusters interface, BUT… it will kill the ability to toggle on and off the physical light that is connected to the switch.

Might also be able to do it with a custom quirk, but I’m not sure if that would be of use to you or not.

Sorry I couldn’t be more help here.

Found it in ZHA. I now have the physical light switch set to coupled, and the other one set to decoupled. The physical lights still work fine.

Is the decoupled stuff the key to doing double presses and the like?

2 Likes

Nicely done! Yeah. basically what you should get now in the logbook is what action the switch performed (on the decoupled paddle) when you do things like single click, double click, etc. Then, you can write automations to capture those events.

1 Like

Amazing. Thank you for your help.

1 Like

Since these are switches, not buttons, I’m not sure you’re going to get very far.

How did you get on?

I was hoping you might be able to help me, I’m a noob (1 week old HA). I’m planning on trying to do something similar and i’m on ZHA. What i want to do is go from this.

To something like this.

Can you explain in very simple terms what i steps i would need to do to get this working in ZHA.

Any help, suggestions very much appreciated.

Hello. Yep. Everything worked fine as soon as I got decoupled mode working.

In terms of getting things working per your diagram:

  1. Install the switches and wire correctly
  2. Add switches to HA via ZHA. By default, they’ll probably be in “coupled” mode
  3. To set decoupled mode in ZHA, you need to select the switch and select “manage zigbee device”:

That brings up this menu:

  1. From here, you can set decoupled mode by selecting one of the *OppleSwitchCluster* entries. There should be one for each “button / gang” on the light switch.

  2. You need to find the correct one for the button you want and then select it’s operation mode and give it the value seen here:
    226e47d2f3c33274f46ddb5bf20fd2c768506cb7_2_585x499

  3. Then you would create your automations. Whichever light switch you want defines the WHEN bit:

  4. …and then you select your light bulbs and give them whatever action you want:

2 Likes

Thank you so much, i feel a lot more confident in buying the switches now.