deCONZ - Aqara Opple Wireless Scene Switch 4 Button - lumi.remote.b486opcn01

Blueprint to support the Aqara Opple Wireless Scene Switch 4 Button .

The buttons support:

  • Single press
  • Double press
  • Triple press
  • Long (hold)
  • Long release

Screen:

Blueprint to import:

blueprint:
  name: deCONZ - Aqara Opple - Wireless 4 Buttons remote
  description: "Supported actions: single, double, tripple, long and longrelease."
  domain: automation
  source_url: https://community.home-assistant.io/t/deconz-aqara-opple-wireless-scene-switch-4-button-lumi-remote-b486opcn01/262960
  # GIU elements
  input:
    remote:
      name: Remote
      description: Opple remote to use
      selector:
        device:
          integration: deconz
          manufacturer: LUMI
          model: lumi.remote.b486opcn01

    # --- BUTTON ONE ---------------------------------------------------------------
    button_one_single_press:
      name: Top left button - Single press
      description: Action on single press button
      default: []
      selector:
        action: {}

    button_one_double_press:
      name: Top left button - Double press
      description: Action on double press button
      default: []
      selector:
        action: {}

    button_one_triple_press:
      name: Top left button - Triple press
      description: Action on triple press button
      default: []
      selector:
        action: {}

    button_one_hold_release:
      name: Top left button - Long release
      description: Action on long release of button
      default: []
      selector:
        action: {}

    button_one_hold_in:
      name: Top left button - Long in
      description: Action on long press button

      default: []
      selector:
        action: {}

    # --- BUTTON TWO ---------------------------------------------------------------
    button_two_single_press:
      name: Top right button - Single press
      description: Action on single press button
      default: []
      selector:
        action: {}

    button_two_double_press:
      name: Top right button - Double press
      description: Action on double press button
      default: []
      selector:
        action: {}

    button_two_triple_press:
      name: Top right button - Triple press
      description: Action on triple press button
      default: []
      selector:
        action: {}

    button_two_hold_release:
      name: Top right button - Long release
      description: Action on long release of button
      default: []
      selector:
        action: {}

    button_two_hold_in:
      name: Top right button - Long in
      description: Action on long press button
      default: []
      selector:
        action: {}

    # --- BUTTON THREE -------------------------------------------------------------
    button_three_single_press:
      name: Bottom left button - Single press
      description: Action on single press button
      default: []
      selector:
        action: {}

    button_three_double_press:
      name: Bottom left button - Double press
      description: Action on double press button
      default: []
      selector:
        action: {}

    button_three_triple_press:
      name: Bottom left button - Triple press
      description: AAction on triple press button
      default: []
      selector:
        action: {}

    button_three_hold_release:
      name: Bottom left button - Long release
      description: Action on long release of button
      default: []
      selector:
        action: {}

    button_three_hold_in:
      name: Bottom left button - Long
      description: Action on long press button
      default: []
      selector:
        action: {}

    # --- BUTTON FOUR --------------------------------------------------------------
    button_four_single_press:
      name: Bottom right button Single press
      description: Action on single press button
      default: []
      selector:
        action: {}

    button_four_double_press:
      name: Bottom right button Double press
      description: Action on double press button
      default: []
      selector:
        action: {}

    button_four_triple_press:
      name: Bottom right button triple press
      description: Action on triple press button
      default: []
      selector:
        action: {}

    button_four_hold_release:
      name: Bottom right button Long release
      description: Action on long release of button
      default: []
      selector:
        action: {}

    button_four_hold_in:
      name: Bottom right button Long in
      description: Action on long press button
      default: []
      selector:
        action: {}
# End GUI elements

# If press detected before end of action restart script
mode: restart
max_exceeded: silent

trigger:
  - platform: event
    event_type: deconz_event
    event_data:
      device_id: !input "remote"
action:
  - variables:
      event: "{{ trigger.event.data.event }}"
  - choose:
      # Automation

      # --- BUTTON ONE ---------------------------------------------------------------
      - conditions:
          - "{{ event == 1002 }}"
        sequence: !input "button_one_single_press"
      - conditions:
          - "{{ event == 1004 }}"
        sequence: !input "button_one_double_press"
      - conditions:
          - "{{ event == 1005 }}"
        sequence: !input "button_one_triple_press"
      - conditions:
          - "{{ event == 1003 }}"
        sequence: !input "button_one_hold_release"
      - conditions:
          - "{{ event == 1001 }}"
        sequence: !input "button_one_hold_in"

      # --- BUTTON TWO ---------------------------------------------------------------
      - conditions:
          - "{{ event == 2002 }}"
        sequence: !input "button_two_single_press"
      - conditions:
          - "{{ event == 2004 }}"
        sequence: !input "button_two_double_press"
      - conditions:
          - "{{ event == 2005 }}"
        sequence: !input "button_two_triple_press"
      - conditions:
          - "{{ event == 2003 }}"
        sequence: !input "button_two_hold_release"
      - conditions:
          - "{{ event == 2001 }}"
        sequence: !input "button_two_hold_in"

      # --- BUTTON THREE -------------------------------------------------------------
      - conditions:
          - "{{ event == 3002 }}"
        sequence: !input "button_three_single_press"
      - conditions:
          - "{{ event == 3004 }}"
        sequence: !input "button_three_double_press"
      - conditions:
          - "{{ event == 3005 }}"
        sequence: !input "button_three_triple_press"
      - conditions:
          - "{{ event == 3003 }}"
        sequence: !input "button_three_hold_release"
      - conditions:
          - "{{ event == 3001 }}"
        sequence: !input "button_three_hold_in"

      # --- BUTTON FOUR --------------------------------------------------------------
      - conditions:
          - "{{ event == 4002 }}"
        sequence: !input "button_four_single_press"
      - conditions:
          - "{{ event == 4004 }}"
        sequence: !input "button_four_double_press"
      - conditions:
          - "{{ event == 4005 }}"
        sequence: !input "button_four_triple_press"
      - conditions:
          - "{{ event == 4003 }}"
        sequence: !input "button_four_hold_release"
      - conditions:
          - "{{ event == 4001 }}"
        sequence: !input "button_four_hold_in"

1 Like

Nice! Got one of those and did not think about ā€˜what would be the best way to fully use itā€™ yet - hereĀ“s a solution, great :+1:

Finally I gave it a try. BUT I have the 2 button version of the Opple switch. I was wondering if this blueprint can be adjusted to make this work too. I tried to, but the Opple switch is not recognized at all :frowning:

Forked this blueprint and created one for 2 button Opple

Thank you @kenny.vanitterbeek :+1:

I have the lumi.remote.b486opcn01 recognized by deCONZ and it also seen as device in HA, unfortunately it doenst fire any event (checked by event listener).

Strangely enough, if I press some of the buttons, some actors are being switched on/off (Iā€™ve never configurated it, so no idea how opple switch gets access to it).

Do you have any idea what is wrong with it and how to fix it ?

Thatā€™s an annoying default ā€žfeatureā€œ of deCONZ when pairing new switches: one button switches on, another off all ZigBee devices connected (plugs, lights, ā€¦).

I only worked around this by deleting and repairing the switch again (and again) until this behavior changes. Event listener will then work too because button events are not kept inside deCONZ anymore.