You can use this blueprint to control 3 lights or groups with an 3 bands Aqara Opple switch (WXCJKG13LM).
It works very well with LED strips and Gledopto controllers (GL-C-008-1ID).
It is inspired by the blueprint of @starbuck93 (Zigbee2Mqtt - IKEA five button remote).
There are 24 actions possible with this switch and 18 of them are preconfigured in the blueprint:
- left short press (buttons 1, 3, 5): turn off
- right short press (buttons 2, 4, 6): turn on
- left long press (buttons 1, 3, 5): decrese the brightness smoothly until released
- right short press (buttons 2, 4, 6): increse the brightness smoothly until released
- right double press (buttons 1, 3, 5): turn on with the warmest light (500 mired)
- right double press (buttons 2, 4, 6): turn on with the coldest light (153 mired)
The rest of 6 actions (the triple clicks) are customizable to answer to everyoneâs needs.
You can import the blueprint by using the current forum topic URL.
blueprint:
name: Z2M - Aqara Opple switch 3 bands
description: 'Control 3 lights with an Aqara Opple switch 3 bands (WXCJKG13LM).
Inspired by the blueprint of @starbuck93 (https://community.home-assistant.io/t/zigbee2mqtt-ikea-five-button-remote/255308)
It works very well with LED strips and Gledopto controllers (GL-C-008-1ID).
Each band controls one light/group.
- left short press (buttons 1, 3, 5): turn off
- right short press (buttons 2, 4, 6): turn on
- left long press (buttons 1, 3, 5): decrese the brightness smoothly until released
- right short press (buttons 2, 4, 6): increse the brightness smoothly until released
- right double press (buttons 1, 3, 5): set the warmest light (500 mired)
- right double press (buttons 2, 4, 6): set the coldest light (153 mired)
- triple clicks: customizable
'
domain: automation
input:
switch:
name: Aqara switch
description: Aqara switch to use
selector:
entity:
domain: sensor
light_1:
name: Light(s)
description: The light(s) to control
selector:
target:
entity:
domain: light
light_2:
name: Light(s)
description: The light(s) to control
selector:
target:
entity:
domain: light
light_3:
name: Light(s)
description: The light(s) to control
selector:
target:
entity:
domain: light
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: {}
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:
- service: light.turn_off
target: !input 'light_1'
data: {}
- conditions:
- '{{ command == ''button_2_single'' }}'
sequence:
- service: light.turn_on
data: {}
target: !input 'light_1'
- conditions:
- '{{ command == ''button_3_single'' }}'
sequence:
- service: light.turn_off
data: {}
target: !input 'light_2'
- conditions:
- '{{ command == ''button_4_single'' }}'
sequence:
- service: light.turn_on
data: {}
target: !input 'light_2'
- conditions:
- '{{ command == ''button_5_single'' }}'
sequence:
- service: light.turn_off
data: {}
target: !input 'light_3'
- conditions:
- '{{ command == ''button_6_single'' }}'
sequence:
- service: light.turn_on
data: {}
target: !input 'light_3'
- conditions:
- '{{ command == ''button_1_double'' }}'
sequence:
- service: light.turn_on
target: !input 'light_1'
data:
color_temp: '500'
- conditions:
- '{{ command == ''button_2_double'' }}'
sequence:
- service: light.turn_on
target: !input 'light_1'
data:
color_temp: '153'
- conditions:
- '{{ command == ''button_3_double'' }}'
sequence:
- service: light.turn_on
target: !input 'light_2'
data:
color_temp: '500'
- conditions:
- '{{ command == ''button_4_double'' }}'
sequence:
- service: light.turn_on
target: !input 'light_2'
data:
color_temp: '153'
- conditions:
- '{{ command == ''button_5_double'' }}'
sequence:
- service: light.turn_on
target: !input 'light_3'
data:
color_temp: '500'
- conditions:
- '{{ command == ''button_6_double'' }}'
sequence:
- service: light.turn_on
target: !input 'light_3'
data:
color_temp: '153'
- conditions:
- '{{ command == ''button_1_hold'' }}'
sequence:
- repeat:
until:
- condition: state
entity_id: !input 'switch'
state: button_1_release
attribute: action
sequence:
- service: light.turn_on
data:
brightness_step_pct: -10
transition: 0.5
target: !input 'light_1'
- delay: '0.2'
- conditions:
- '{{ command == ''button_2_hold'' }}'
sequence:
- repeat:
until:
- condition: state
entity_id: !input 'switch'
state: button_2_release
attribute: action
sequence:
- service: light.turn_on
data:
brightness_step_pct: 10
transition: 1
target: !input 'light_1'
- delay: '1'
- conditions:
- '{{ command == ''button_3_hold'' }}'
sequence:
- repeat:
until:
- condition: state
entity_id: !input 'switch'
state: button_3_release
attribute: action
sequence:
- service: light.turn_on
data:
brightness_step_pct: -10
target: !input 'light_2'
- delay: '1'
- conditions:
- '{{ command == ''button_4_hold'' }}'
sequence:
- repeat:
until:
- condition: state
entity_id: !input 'switch'
state: button_4_release
attribute: action
sequence:
- service: light.turn_on
data:
brightness_step_pct: 10
target: !input 'light_2'
- delay: '1'
- conditions:
- '{{ command == ''button_5_hold'' }}'
sequence:
- repeat:
until:
- condition: state
entity_id: !input 'switch'
state: button_5_release
attribute: action
sequence:
- service: light.turn_on
data:
brightness_step_pct: -10
target: !input 'light_3'
- delay: '1'
- conditions:
- '{{ command == ''button_6_hold'' }}'
sequence:
- repeat:
until:
- condition: state
entity_id: !input 'switch'
state: button_6_release
attribute: action
sequence:
- service: light.turn_on
data:
brightness_step_pct: 10
target: !input 'light_3'
- delay: '1'
- 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'