Edited from Zigbee2mqtt - Aqara Opple switch 3 bands
blueprint:
name: Z2M - Aqara Opple switch 3 bands
description: 'Aqara Opple switch 3 bands (WXCJKG13LM).'
domain: automation
input:
switch:
name: Aqara switch
description: Aqara switch to use
selector:
entity:
domain: sensor
button_1_single:
name: Button 1 - single click
description: Action to run on single click of button 1
default: []
selector:
action: {}
button_2_single:
name: Button 2 - single click
description: Action to run on single click of button 2
default: []
selector:
action: {}
button_3_single:
name: Button 3 - single click
description: Action to run on single click of button 3
default: []
selector:
action: {}
button_4_single:
name: Button 4 - single click
description: Action to run on single click of button 4
default: []
selector:
action: {}
button_5_single:
name: Button 5 - single click
description: Action to run on single click of button 5
default: []
selector:
action: {}
button_6_single:
name: Button 6 - single click
description: Action to run on single click of button 6
default: []
selector:
action: {}
button_1_double:
name: Button 1 - double click
description: Action to run on double click of button 1
default: []
selector:
action: {}
button_2_double:
name: Button 2 - double click
description: Action to run on double click of button 2
default: []
selector:
action: {}
button_3_double:
name: Button 3 - double click
description: Action to run on double click of button 3
default: []
selector:
action: {}
button_4_double:
name: Button 4 - double click
description: Action to run on double click of button 4
default: []
selector:
action: {}
button_5_double:
name: Button 5 - double click
description: Action to run on double click of button 5
default: []
selector:
action: {}
button_6_double:
name: Button 6 - double click
description: Action to run on double click of button 6
default: []
selector:
action: {}
button_1_triple:
name: Button 1 - triple click
description: Action to run on triple click of button 1
default: []
selector:
action: {}
button_2_triple:
name: Button 2 - triple click
description: Action to run on triple click of button 2
default: []
selector:
action: {}
button_3_triple:
name: Button 3 - triple click
description: Action to run on triple click of button 3
default: []
selector:
action: {}
button_4_triple:
name: Button 4 - triple click
description: Action to run on triple click of button 4
default: []
selector:
action: {}
button_5_triple:
name: Button 5 - triple click
description: Action to run on triple click of button 5
default: []
selector:
action: {}
button_6_triple:
name: Button 6 - triple click
description: Action to run on triple click of button 6
default: []
selector:
action: {}
button_1_hold:
name: Button 1 - hold click
description: Action to run on hold click of button 1
default: []
selector:
action: {}
button_2_hold:
name: Button 2 - hold click
description: Action to run on hold click of button 2
default: []
selector:
action: {}
button_3_hold:
name: Button 3 - hold click
description: Action to run on hold click of button 3
default: []
selector:
action: {}
button_4_hold:
name: Button 4 - hold click
description: Action to run on hold click of button 4
default: []
selector:
action: {}
button_5_hold:
name: Button 5 - hold click
description: Action to run on hold click of button 5
default: []
selector:
action: {}
button_6_hold:
name: Button 6 - hold click
description: Action to run on hold click of button 6
default: []
selector:
action: {}
mode: restart
max_exceeded: silent
trigger:
- platform: state
entity_id: !input 'switch'
attribute: action
action:
- variables:
command: '{{ trigger.to_state.state }}'
- choose:
- conditions:
- '{{ command == ''button_1_single'' }}'
sequence: !input 'button_1_single'
- conditions:
- '{{ command == ''button_2_single'' }}'
sequence: !input 'button_2_single'
- conditions:
- '{{ command == ''button_3_single'' }}'
sequence: !input 'button_3_single'
- conditions:
- '{{ command == ''button_4_single'' }}'
sequence: !input 'button_4_single'
- conditions:
- '{{ command == ''button_5_single'' }}'
sequence: !input 'button_5_single'
- conditions:
- '{{ command == ''button_6_single'' }}'
sequence: !input 'button_6_single'
- conditions:
- '{{ command == ''button_1_double'' }}'
sequence: !input 'button_1_double'
- conditions:
- '{{ command == ''button_2_double'' }}'
sequence: !input 'button_2_double'
- conditions:
- '{{ command == ''button_3_double'' }}'
sequence: !input 'button_3_double'
- conditions:
- '{{ command == ''button_4_double'' }}'
sequence: !input 'button_4_double'
- conditions:
- '{{ command == ''button_5_double'' }}'
sequence: !input 'button_5_double'
- conditions:
- '{{ command == ''button_6_double'' }}'
sequence: !input 'button_6_double'
- conditions:
- '{{ command == ''button_1_hold'' }}'
sequence: !input 'button_1_hold'
- conditions:
- '{{ command == ''button_2_hold'' }}'
sequence: !input 'button_2_hold'
- conditions:
- '{{ command == ''button_3_hold'' }}'
sequence: !input 'button_3_hold'
- conditions:
- '{{ command == ''button_4_hold'' }}'
sequence: !input 'button_4_hold'
- conditions:
- '{{ command == ''button_5_hold'' }}'
sequence: !input 'button_5_hold'
- conditions:
- '{{ command == ''button_6_hold'' }}'
sequence: !input 'button_6_hold'
- conditions:
- '{{ command == ''button_1_triple'' }}'
sequence: !input 'button_1_triple'
- conditions:
- '{{ command == ''button_2_triple'' }}'
sequence: !input 'button_2_triple'
- conditions:
- '{{ command == ''button_3_triple'' }}'
sequence: !input 'button_3_triple'
- conditions:
- '{{ command == ''button_4_triple'' }}'
sequence: !input 'button_4_triple'
- conditions:
- '{{ command == ''button_5_triple'' }}'
sequence: !input 'button_5_triple'
- conditions:
- '{{ command == ''button_6_triple'' }}'
sequence: !input 'button_6_triple'