This blueprint will let you configure a Aqara Wireless Remote Switch (Double Rocker) (Eu Version) which is paired with ZHA. It supports commands for single, double and long-press for each rocker or both rockers together.
There is also an blueprint out there for the single rocker version of the switch: ZHA - Aqara Wireless Remote Switch (Single Rocker).
Requirements:
- Aqara Wireless Remote Switch (Double Rocker). Be patient to select the right device, because there can be also other Lumi/Aqara devices in the list that arent compatible with this automation (See changelog for details)
- ZHA integration
This blueprint is based on ZHA - Aqara Wireless Mini Switch from SeanM. Thanks!
Blueprint:
blueprint:
name: ZHA - Aqara Wireless Remote Switch (Double Rocker)
description: Automate your Xiaomi Aqara Wireless Remote Switch (Double Rocker) using ZHA events.
domain: automation
input:
aqara_mini_switch:
name: Select the Aqara Wireless Remote Switch (Double Rocker)
description: Aqara Wireless Remote Switch (Double Rocker)
selector:
device:
integration: zha
manufacturer: LUMI
entity:
domain: sensor
device_class: battery
button_single_press_left:
name: Single Press Left
description: Action to run on single press
default: []
selector:
action:
button_double_press_left:
name: Double Press Left
description: Action to run on double press
default: []
selector:
action:
button_long_press_left:
name: Long Press Left
description: Action to run when button is long pressed (held down)
default: []
selector:
action:
button_single_press_right:
name: Single Press Right
description: Action to run on single press
default: []
selector:
action:
button_double_press_right:
name: Double Press Right
description: Action to run on double press
default: []
selector:
action:
button_long_press_right:
name: Long Press Right
description: Action to run when button is long pressed (held down)
default: []
selector:
action:
button_single_press_both:
name: Single Press Both Buttons
description: Action to run on single presses
default: []
selector:
action:
button_double_press_both:
name: Double Press Both Buttons
description: Action to run on double presses
default: []
selector:
action:
button_long_press_both:
name: Long Press Both Buttons
description: Action to run when buttons are long pressed (held down)
default: []
selector:
action:
mode: restart
max_exceeded: silent
trigger:
- platform: event
event_type: zha_event
event_data:
device_id: !input aqara_mini_switch
action:
- variables:
command: "{{ trigger.event.data.command }}"
- choose:
- conditions:
- "{{ command == 'left_single' }}"
sequence: !input button_single_press_left
- conditions:
- "{{ command == 'left_double' }}"
sequence: !input button_double_press_left
- conditions:
- "{{ command == 'left_long press' }}"
sequence: !input button_long_press_left
- conditions:
- "{{ command == 'right_single' }}"
sequence: !input button_single_press_right
- conditions:
- "{{ command == 'right_double' }}"
sequence: !input button_double_press_right
- conditions:
- "{{ command == 'right_long press' }}"
sequence: !input button_long_press_right
- conditions:
- "{{ command == 'both_single' }}"
sequence: !input button_single_press_both
- conditions:
- "{{ command == 'both_double' }}"
sequence: !input button_double_press_both
- conditions:
- "{{ command == 'both_long press' }}"
sequence: !input button_long_press_both
Changelog
- 2020-12-24: Fixed Typo (Thanks rvst1Stefan)
- 2020-12-29: Added Actions if both buttons are pressed once, twice ore held down (Thanks Jonah1970Mark)
- 2021-01-01: The Selector was specified to the model lumi.remote.b286acn01, but seems that are also lumi.remote.b286acn02 (and maybe more) available. As a consequence the selector is now more open and accepts all Lumi devices in the ZHA-Integration which have a battery. So be patient to select the right device because there can be other Lumi-devices in the list which arent compatible (Thanks TimmiT93Tim)