deCONZ - Aqara Opple Wireless Scene Switch - 4 Button

Tags: #<Tag:0x00007f32632aa8e0> #<Tag:0x00007f32632aa778> #<Tag:0x00007f32632aa638>

Fork from deCONZ - Aqara Opple Wireless Scene Switch - 6 Button thanks to @Savjee to use on a 4 button switch

All buttons support the following actions:

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

Blueprint to import:

blueprint:
  name: deCONZ - Aqara Opple - Wireless Scene Switch 4 Button
  description: Control anything using Aqara Opple four button remote
  domain: automation
  input:
    remote:
      name: Remote
      description: Opple remote to use
      selector:
        device:
          integration: deconz
          manufacturer: LUMI
          model: lumi.remote.b486opcn01
    button_top_left_single_press:
      name: Top left button - Single press
      description: Action to run on a single press of the top left button
      default: []
      selector:
        action: {}
    button_top_left_double_press:
      name: Top left button - Double press
      description: Action to run on a double press of the top left button
      default: []
      selector:
        action: {}
    button_top_left_triple_press:
      name: Top left button - Triple press
      description: Action to run on a triple press of the top left button
      default: []
      selector:
        action: {}
    button_top_left_hold_release:
      name: Top left button - Hold release
      description: Action to run when top left button was held in and released
      default: []
      selector:
        action: {}
    button_top_left_hold_in:
      name: Top left button - Hold in
      description: Action to run when top left button is held in
      default: []
      selector:
        action: {}
    button_top_right_single_press:
      name: Top right button - Single press
      description: Action to run on a single press of the top right button
      default: []
      selector:
        action: {}
    button_top_right_double_press:
      name: Top right button - Double press
      description: Action to run on a double press of the top right button
      default: []
      selector:
        action: {}
    button_top_right_triple_press:
      name: Top right button - Triple press
      description: Action to run on a triple press of the top right button
      default: []
      selector:
        action: {}
    button_top_right_hold_release:
      name: Top right button - Hold release
      description: Action to run when top right button was held in and released
      default: []
      selector:
        action: {}
    button_top_right_hold_in:
      name: Top right button - Hold in
      description: Action to run when top right button is held in
      default: []
      selector:
        action: {}
    button_bottom_left_single_press:
      name: Bottom left button - Single press
      description: Action to run on a single press of the bottom left button
      default: []
      selector:
        action: {}
    button_bottom_left_double_press:
      name: Bottom left button - Double press
      description: Action to run on a double press of the bottom left button
      default: []
      selector:
        action: {}
    button_bottom_left_triple_press:
      name: Bottom left button - Triple press
      description: Action to run on a triple press of the bottom left button
      default: []
      selector:
        action: {}
    button_bottom_left_hold_release:
      name: Bottom left button - Hold release
      description: Action to run when bottom left button was held in and released
      default: []
      selector:
        action: {}
    button_bottom_left_hold_in:
      name: Bottom left button - Hold in
      description: Action to run when bottom left button is held in
      default: []
      selector:
        action: {}
    button_bottom_right_single_press:
      name: Bottom right button - Single press
      description: Action to run on a single press of the bottom right button
      default: []
      selector:
        action: {}
    button_bottom_right_double_press:
      name: Bottom right button - Double press
      description: Action to run on a double press of the bottom right button
      default: []
      selector:
        action: {}
    button_bottom_right_triple_press:
      name: Bottom right button - Triple press
      description: Action to run on a triple press of the bottom right button
      default: []
      selector:
        action: {}
    button_bottom_right_hold_release:
      name: Bottom right button - Hold release
      description: Action to run when bottom right button was held in and released
      default: []
      selector:
        action: {}
    button_bottom_right_hold_in:
      name: Bottom right button - Hold in
      description: Action to run when bottom right button is held in
      default: []
      selector:
        action: {}
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:
  - conditions:
    - '{{ event == 1002 }}'
    sequence: !input 'button_top_left_single_press'
  - conditions:
    - '{{ event == 1004 }}'
    sequence: !input 'button_top_left_double_press'
  - conditions:
    - '{{ event == 1005 }}'
    sequence: !input 'button_top_left_triple_press'
  - conditions:
    - '{{ event == 1003 }}'
    sequence: !input 'button_top_left_hold_release'
  - conditions:
    - '{{ event == 1001 }}'
    sequence: !input 'button_top_left_hold_in'
  - conditions:
    - '{{ event == 2002 }}'
    sequence: !input 'button_top_right_single_press'
  - conditions:
    - '{{ event == 2004 }}'
    sequence: !input 'button_top_right_double_press'
  - conditions:
    - '{{ event == 2005 }}'
    sequence: !input 'button_top_right_triple_press'
  - conditions:
    - '{{ event == 2003 }}'
    sequence: !input 'button_top_right_hold_release'
  - conditions:
    - '{{ event == 2001 }}'
    sequence: !input 'button_top_right_hold_in'
  - conditions:
    - '{{ event == 3002 }}'
    sequence: !input 'button_bottom_left_single_press'
  - conditions:
    - '{{ event == 3004 }}'
    sequence: !input 'button_bottom_left_double_press'
  - conditions:
    - '{{ event == 3005 }}'
    sequence: !input 'button_bottom_left_triple_press'
  - conditions:
    - '{{ event == 3003 }}'
    sequence: !input 'button_bottom_left_hold_release'
  - conditions:
    - '{{ event == 3001 }}'
    sequence: !input 'button_bottom_left_hold_in'
  - conditions:
    - '{{ event == 4002 }}'
    sequence: !input 'button_bottom_right_single_press'
  - conditions:
    - '{{ event == 4004 }}'
    sequence: !input 'button_bottom_right_double_press'
  - conditions:
    - '{{ event == 4005 }}'
    sequence: !input 'button_bottom_right_triple_press'
  - conditions:
    - '{{ event == 4003 }}'
    sequence: !input 'button_bottom_right_hold_release'
  - conditions:
    - '{{ event == 4001 }}'
    sequence: !input 'button_bottom_right_hold_in'

Already tested and working! :slight_smile:

2 Likes

Thanks. Simple, easy and straightforward.

1 Like

I have a 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 :frowning:

Update: created it by my own. In case someone is interested

Thanks @dferrandizmont for inspiration :+1:

1 Like