I tried even reinstalling everything(VM,HA etc). I don’t care about losing any devices on HA cause I just started using it and this switch was the reason. Thing is, I found out that also in coupled mode the device doesn’t send any signal even though I can control it from HA/z2m. I have set one automation to turn on/off one lamp irrelevant from the switch power and when I change the switch from HA it does work like supposed to( I even hear the click from the switch so it receives the command), But when I press the physical switch it does only change the power(you can hear the click) but doesn’t change the state on HA so the automation doesn’t work.
Hey I saw the reddit post as well, but only until now, I know how to “train” the switches, thanks to you.
But now I have two issues:
- Some switches were trained successfully (mostly double rocker switches), while others didn’t seem trainable (three rocker switches). All of my switches are D1 with neutral and all updated.
- When physically pressed, some of my switches update their status in mqtt immediately, and others don’t update until I click the refresh button.
Have you seen those issues or have any idea how to fix them?
I have 1 aqara switch with neutral and its working for 6 months. I bought 6 more from the same seller and they don’t work in decoupled mode. I think there was some training. But what… Holding bother buttons or what. I think at some point the light indicator went red. Hope there is a way to make them work
It worked. Can’t say how i trained it. Had to hold the 2 buttons until they went red. (I think that’s disconcting and trying to connect again). From Zigbee2MQTT can to refresh it, remove it. Did this 5-6 times. Maybe pressed one of the buttons some times. Really hard to remember it all. Will try with the rest 5 switches and try to find some pattern. Hope it will help you and future me!
I stumbled upon the same issue, but I made it work. So if anyone faces the same issues, I hope this helps:
Setup:
- Home Assistant 2024.5.5 on Raspi 4
- zigbee2mqtt with SLZB-06 (FW 0.9.9) as Coordinator
- Aqara H1 WS-EUK04
The Wall Switch is set to decoupled mode for both switches since it controls a Hue Lightbulb and has the State set to ON for the Left Button (thats where the wire runs).
When pressing the button, I do not receive any actions in the Z2M logs, however the Home Assistant Entity reports its status in the Logbook of the Settings → Devices → Detail Screen (the “Action” Entity is the one):
In my case, I pressed the right button, which causes the Action entity to report a change to “single_right” and immediately followed up by an empty one. And after 10 seconds the status is set to “None”. (This ties into FAQ | Zigbee2MQTT)
So now that it was confirmed, that the Switch indeed sends an update, I modified the blueprint from Z2M - Aqara H1(WRS-R02) - Wireless remote switch(Double Rocker) (Updated) - Single/Double + Single/Double/Hold so it works with the H1:
Modifications I made:
- remove the triple and hold actions, since the H1 does not support it
- and removed the attribute: action trigger selection, so it takes the state as it is sent
Here is my working blueprint:
blueprint:
name: Z2M - Aqara H1(WS-EUK02) - Wall switch (double rocker)
description: Scene & device control using Aqara two button wall switch
domain: automation
input:
button_sensor:
name: Aqara switch
description: Aqara switch to use
selector:
entity:
domain: sensor
integration: mqtt
multiple: false
single_left:
name: Left button - Single press
description: Action to run on a single press of the left button
default: []
selector:
action: {}
double_left:
name: Left button - Double press
description: Action to run on a double press of the left button
default: []
selector:
action: {}
single_right:
name: Right button - Single press
description: Action to run on a single press of the right button
default: []
selector:
action: {}
double_right:
name: Right button - Double press
description: Action to run on a double press of the right button
default: []
selector:
action: {}
single_both:
name: Both buttons - Single press
description: Action to run on a single press of both buttons
default: []
selector:
action: {}
double_both:
name: Both buttons - Double press
description: Action to run on a double press of both buttons
default: []
selector:
action: {}
hold_both:
name: Both buttons - Hold
description: Action to run when both buttons are held
default: []
selector:
action: {}
source_url: https://community.home-assistant.io/t/z2m-aqara-h1-wrs-r02-wireless-remote-switch-double-rocker-updated-single-double-single-double-hold/455665
mode: restart
max_exceeded: silent
trigger:
- platform: state
entity_id: !input "button_sensor"
action:
- variables:
command: "{{ trigger.to_state.state }}"
- choose:
- conditions:
- "{{ command == 'single_left' }}"
sequence: !input "single_left"
- conditions:
- "{{ command == 'double_left' }}"
sequence: !input "double_left"
- conditions:
- "{{ command == 'single_right' }}"
sequence: !input "single_right"
- conditions:
- "{{ command == 'double_right' }}"
sequence: !input "double_right"
- conditions:
- "{{ command == 'single_both' }}"
sequence: !input "single_both"
- conditions:
- "{{ command == 'double_both' }}"
sequence: !input "double_both"
- conditions:
- "{{ command == 'hold_both' }}"
sequence: !input "hold_both"
That allowed me to setup conditions so the left button triggers Daylight Scene, the right one Nightlight Scene, and when pressing the button with the active scene again it turns the light off again (I can post the details on that if you are interested).
Hope this helps!
I can see the same behaviour with ZHA, where ZHA “forgets” how the switch worked after a reboot, and I don’t see any events. I don’t have to press it many times though, but I think 1 or 2 seconds of activity when pairing make the difference…
Anyway, the “forget on reboot” part has been driving me nuts for a month now. No software or firmare updates of any component fixed it so far… This dones’t even seem to be a consistent problem in the community.
Good luck to all
This kind of helped me. Basically I didn’t see any mqtt messages or anything when I physically pressed the button on my US Double Rocker version of the H1 w/ neutral. I updated the firmware on my new sonoff zigbee dongle. No luck, but I finally got something when I deleted and readded the switch in zigbee2mqtt. I was so surprised that it wasn’t in there, but it makes sense I guess. ZHA was working but I wanted the flexibility of using z2m so that’s why I switched. I still have some window sensors to move over but I don’t care about those as much.
The automation is so simple, I’m surprised binding didn’t work for me. Basically top button press triggers the ceiling fan light to turn on and the bottom button press triggers the fan to turn on. On the ceiling fan I just hooked up a Aqara T2 and it works great.