ZHA - Aqara Wireless Remote Switch (Single Rocker)

Hi, I have an old Aqara Single Rocker (2016), the model is lumi.sensor_86sw1. Switch doesn’t support double or long press. But that’s ok, skip it :wink:
This switch successfully integrates with ZHA, however event data is different and blueprint doesn’t work for a single press.
I’ve modified this blueprint to work with the old version (part of the code with variables and conditions for single press action):

- variables:
    command: '{{ trigger.event.data.command }}'
    attribute_name:  '{{ trigger.event.data.args.attribute_name }}'
    attribute_value:  '{{ trigger.event.data.args.value }}'
- choose:
  - conditions:
    - condition: or
      conditions: 
        - '{{ command == ''single'' }}'
        - '{{ command == ''attribute_updated'' and attribute_name == ''on_off'' and attribute_value == ''Bool.true'' }}'
    sequence: !input 'button_single_press'

The event trigger is described here: ZHA Zigbee Tested Devices...Please add your device results - #646 by Quatuor

1 Like