Forked from rhl2401/zigbee2mqtt_aqara_wireless_switch.yaml
Last active
January 26, 2025 09:47
-
-
Save NeskireDK/471921df3fe05e33c712a9a6c5aa2fb1 to your computer and use it in GitHub Desktop.
Aqara Wireless Switch (single, double, hold)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Aqara Switch Blueprint | |
description: > | |
Use this blueprint to control actions for Aqara switches or any other MQTT sensor light switches. | |
domain: automation | |
input: | |
mqtt_device: | |
name: MQTT Device | |
description: > | |
Select an MQTT device, make sure to only select a device of Switch nature | |
selector: | |
device: | |
integration: mqtt | |
single_action: | |
name: Single Press Action | |
description: Define the action to execute on a single press. | |
default: [] | |
selector: | |
action: {} | |
double_action: | |
name: Double Press Action | |
description: Define the action to execute on a double press. | |
default: [] | |
selector: | |
action: {} | |
hold_action: | |
name: Hold Press Action | |
description: Define the action to execute on a hold press. | |
default: [] | |
selector: | |
action: {} | |
trigger: | |
- platform: device | |
domain: mqtt | |
device_id: !input mqtt_device | |
type: action | |
subtype: single | |
id: Single | |
- platform: device | |
domain: mqtt | |
device_id: !input mqtt_device | |
type: action | |
subtype: double | |
id: Double | |
- platform: device | |
domain: mqtt | |
device_id: !input mqtt_device | |
type: action | |
subtype: hold | |
id: Hold | |
action: | |
- choose: | |
- conditions: | |
- condition: trigger | |
id: Single | |
sequence: !input single_action | |
- conditions: | |
- condition: trigger | |
id: Double | |
sequence: !input double_action | |
- conditions: | |
- condition: trigger | |
id: Hold | |
sequence: !input hold_action |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment