Aqara Opple 2 Buttons For Zha

Tags: #<Tag:0x00007fc412b9d498> #<Tag:0x00007fc412b9d380>

Aqara Opple 2 Buttons For Zha

Blueprint to support the Aqara Opple Wireless Scene Switch - 2 Button . Combine actions for all buttons in a single automation.

All buttons support the following actions:

  • Single press
  • Double press
  • Tripple press
  • Hold in
  • Hold release

Blueprint

Click the badge to import this Blueprint: (needs Home Assistant Core 2021.3 or higher)

Or import this Blueprint by using the forum topic URL:

blueprint:
  name: ZHA - Aqara Opple - Wireless Scene Switch 2 button
  description: 'Control anything using Aqara Opple two button remote'
  domain: automation
  input:
    remote:
      name: Remote
      description: Opple remote to use
      selector:
        device:
          integration: zha
          manufacturer: LUMI
          model: lumi.remote.b286opcn01
    
    # ---------------------------- BUTTON Left ----------------------------
    button_left_single_press:
      name: Left button - Single press
      description: Action to run on a single press of the Left button
      default: []
      selector:
        action: {}

    button_left_double_press:
      name: Left button - Double press
      description: Action to run on a double press of the Left button
      default: []
      selector:
        action: {}

    button_left_triple_press:
      name: Left button - Triple press
      description: Action to run on a triple press of the Left button
      default: []
      selector:
        action: {}

    button_left_hold_release:
      name: Left button - Hold release
      description: Action to run when Left button was held in and released
      default: []
      selector:
        action: {}

    button_left_hold_in:
      name: Left button - Hold in
      description: Action to run when Left button is held in
      default: []
      selector:
        action: {}

    # ---------------------------- BUTTON Right ----------------------------
    button_right_single_press:
      name: Right button - Single press
      description: Action to run on a single press of the Right button
      default: []
      selector:
        action: {}

    button_right_double_press:
      name: Right button - Double press
      description: Action to run on a double press of the Right button
      default: []
      selector:
        action: {}

    button_right_triple_press:
      name: Right button - Triple press
      description: Action to run on a triple press of the Right button
      default: []
      selector:
        action: {}

    button_right_hold_release:
      name: Right button - Hold release
      description: Action to run when Right button was held in and released
      default: []
      selector:
        action: {}

    button_right_hold_in:
      name: Right button - Hold in
      description: Action to run when Right button is held in
      default: []
      selector:
        action: {}

mode: restart
max_exceeded: silent
trigger:
- platform: event
  event_type: zha_event
  event_data:
    device_id: !input 'remote'
action:
- variables:
    event: '{{ trigger.event.data.command }}'
- choose:

  # ---------------------------- BUTTON Left ----------------------------
  - conditions:
    - '{{ event == "1_single" }}'
    sequence: !input 'button_left_single_press'
  - conditions:
    - '{{ event == "1_double" }}'
    sequence: !input 'button_left_double_press'
  - conditions:
    - '{{ event == "1_triple" }}'
    sequence: !input 'button_left_triple_press'
  - conditions:
    - '{{ event == "1_release" }}'
    sequence: !input 'button_left_hold_release'
  - conditions:
    - '{{ event == "1_long press" }}'
    sequence: !input 'button_left_hold_in'

  # ---------------------------- BUTTON Right ----------------------------
  - conditions:
    - '{{ event == "2_single" }}'
    sequence: !input 'button_right_single_press'
  - conditions:
    - '{{ event == "2_double" }}'
    sequence: !input 'button_right_double_press'
  - conditions:
    - '{{ event == "2_triple" }}'
    sequence: !input 'button_right_triple_press'
  - conditions:
    - '{{ event == "2_release" }}'
    sequence: !input 'button_right_hold_release'
  - conditions:
    - '{{ event == "2_long press" }}'
    sequence: !input 'button_right_hold_in'

Credits for @dferrandizmont and @Jarne_Roussard for the 4 and 6 button versions.

I use Zigbee2MQTT.
When using this blueprint I cannot select my WXCJKG11LM switch: No matching devices found

When using another blueprint (for 3 bands) I can select it normally

Any help?

This is for ZHA as stated in the title.

I use ZHA. I added the blueprint, I created the automation, but even if I can see that the switch triggers the automation, actions don’t run. Do you have any idea?