Fork from / based on deCONZ - Aqara Opple Wireless Scene Switch 4 Button - lumi.remote.b486opcn01 by @kenny.vanitterbeek
So now for usage with deCONZ there are blueprints for
- 6 button - link
- 4 button - option 1, option 2
- 2 button - this one
It´s my first blueprint and I only created it because I needed it for myself, adjustments were just minimal. Hope others can benefit from it too. Works for me, not sure if I can “support” it, we´ll see.
Button events supported:
- Single press
- Double press
- Triple press
- Hold in
- Hold release
Blueprint screenshot (empty example)
Blueprint to import:
blueprint:
name: deCONZ - Aqara Opple - Wireless Scene Switch 2 Button
description: "Supported actions: single, double, triple, long and long release."
domain: automation
source_url: https://community.home-assistant.io/t/deconz-aqara-opple-wireless-scene-switch-2-button-lumi-remote-b286opcn01-wxcjkg11lm/272045
# GUI elements
input:
remote:
name: Remote
description: Opple remote to use
selector:
device:
integration: deconz
manufacturer: LUMI
model: lumi.remote.b286opcn01
# --- BUTTON ONE ---------------------------------------------------------------
button_one_single_press:
name: Left button - Single press
description: Action on single press button
default: []
selector:
action: {}
button_one_double_press:
name: Left button - Double press
description: Action on double press button
default: []
selector:
action: {}
button_one_triple_press:
name: Left button - Triple press
description: Action on triple press button
default: []
selector:
action: {}
button_one_hold_release:
name: Left button - Long release
description: Action on long release of button
default: []
selector:
action: {}
button_one_hold_in:
name: Left button - Long in
description: Action on long press button
default: []
selector:
action: {}
# --- BUTTON TWO ---------------------------------------------------------------
button_two_single_press:
name: Right button - Single press
description: Action on single press button
default: []
selector:
action: {}
button_two_double_press:
name: Right button - Double press
description: Action on double press button
default: []
selector:
action: {}
button_two_triple_press:
name: Right button - Triple press
description: Action on triple press button
default: []
selector:
action: {}
button_two_hold_release:
name: Right button - Long release
description: Action on long release of button
default: []
selector:
action: {}
button_two_hold_in:
name: 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"
History:
- 2021-01-23 20:04: First release
- 2021-01-23 20:45: Blueprint content: fixed GUI (button names)
- 2021-01-23 20:53: Blueprint content: updated blueprint name
- 2021-01-23 20:55: Renamed links to other deCONZ Aqara Opple blueprints
- 2021-01-23 22:23: Added blueprint screenshot (empty example)
- 2021-01-30 15:55: Added tags for thread