Aqara Wireless Switch (Double) click problem

Hi all,

I installed and added Aqara Wireless Switch (Double) to my hassio installation. Two switches where successfully added :

switch.wall_switch_left_158d00012bad84
switch.wall_switch_right_158d00012bad84

I can use the service to turn them on or off and toggle them.

If I look into the documentation I should be also able to receive a click event for each button
and it should be also possible to get an event when both are clicked together.

But I never get a click event, not for the single click and also not when both are clicked.
Do I have to configure something special to enable this feature ?

Thanks a lot.

Do you see the status of each switch in the HA interface? (On or Off)

Yes I can see it. Its also changing when i use the services.
image

If you see the status changing in HA, everything is already working.

If you need to do something when the switch is pressed, your can use a state change trigger in an automation.

automation:
  - alias: Do something when switch is pressed
    trigger:
      platform: state
      entity_id: switch.wall_switch_left_158d00012bad84

You can also react only when turned on:

    trigger:
      platform: state
      entity_id: switch.wall_switch_left_158d00012bad84
      to: 'on'

or off:

    trigger:
      platform: state
      entity_id: switch.wall_switch_left_158d00012bad84
      to: 'off'

Hi @touliloup,

Thanks a lot for your help. The states are working already fine for me.

But i would like to use events like the click event , to implement behaviors for long click or a double click for example.
It would be also great to get a event if both where pressed at the same time. From the documentation this should be also possible, but i cant get it working.

Greetings

Did you try that:

Yes it tryed this. It is also working fine for the binary_sensor switch.
The problem only appears for the wall switches.

In the documenation of binary_sensor is mentioned that the wall switch also supports the click event:
https://home-assistant.io/components/binary_sensor.xiaomi_aqara/

Greetings

Did you ever get this working? Having the same problem with a double wireless switch.

Thanks.

Hi tkh,

It can’t work. I checked the Xiaomi protocol specification, the switches don’t support the double click. Also the HA code doesn’t support jts, it’s an error in the documentation.

Greetings

You can implement a ‘counter’ in appdaemon (and I assume node-red, but only ever tried it in appdaemon) to fake any number of clicks with a definable timeout between them. The only issue you’ll have is that you might struggle to get really quick double clicks working.