this blueprint based on the 4 Button blueprint. Thanks to Jarne_Roussard for the initial work
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
# ---- Left button ---
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: {}
# -- Right button ---
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 whenRight button was held in and released
default: []
selector:
action: {}
button_right_hold_in:
name: Right button - Hold in
description: Action to run whenRight button is held in
default: []
selector:
action: {}
source_url: https://community.home-assistant.io/t/zha-aqara-opple-wireless-scene-switch-2-button/375107
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:
- 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'
- 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'