First of all: this is my first blueprint so if a made a mistake somewhere please let me know and I’ll do my best to correct it.
This blueprint adds support for the Aqara Wireless Switch created by Zigbee2MQTT. It’s inspired by @SeanM’s blueprint.
Supported actions are:
- Single
- Double
- Triple
- Quadruple
Note: There is quite a similar wireless switch out there which looks exactly like the one this blueprint can be used for but it has different button press actions (e.g. long press) which this blueprint doesn’t support.
Import the blueprint by using the forum topic URL!
Changelog
- 2023-05-15: Removed
attribute: click
- 2021-02-04: Adjust name of blueprint to differ from the similar switch with different types of button presses
- 2021-01-07: Added mqtt as integration type for the sensor
- 2020-12-22: Initial version
blueprint:
name: Aqara Wireless Switch (single, double, triple, quadruple)
description: 'Control anything using Aqara Wireless Switch'
domain: automation
input:
switch:
name: Switch
description: Action sensor of Aqara Wireless Switch to use
selector:
entity:
domain: sensor
integration: mqtt
press_single:
name: Single button press
description: Action to run on single button press
default: []
selector:
action: {}
press_double:
name: Double button press
description: Action to run on double button press
default: []
selector:
action: {}
press_triple:
name: Triple button press
description: Action to run on double triple press
default: []
selector:
action: {}
press_quadruple:
name: Quadruple button press
description: Action to run on double quadruple press
default: []
selector:
action: {}
mode: restart
max_exceeded: silent
trigger:
- platform: state
entity_id: !input switch
action:
- variables:
command: "{{ trigger.to_state.state }}"
- choose:
- conditions:
- "{{ command == 'single' }}"
sequence: !input press_single
- conditions:
- "{{ command == 'double' }}"
sequence: !input press_double
- conditions:
- "{{ command == 'triple' }}"
sequence: !input press_triple
- conditions:
- "{{ command == 'quadruple' }}"
sequence: !input press_quadruple
A screenshot of the Blueprint: