Instantly share code, notes, and snippets.
Last active
March 5, 2023 22:23
-
Star
0
(0)
You must be signed in to star a gist -
Fork
0
(0)
You must be signed in to fork a gist
-
Save adamawolf/14a1c36c4c3c6c8dae191d70ff5639e9 to your computer and use it in GitHub Desktop.
This file contains 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: zigbee2mqtt Aqara 6-button Opple Switch control | |
description: '' | |
domain: automation | |
input: | |
button_mqtt_action: | |
name: MQTT action topic for Switch | |
description: Switch\'s MQTT topic (e.g. zigbee2mqtt/Switch Name Here/action) | |
selector: | |
text: | |
action_for_button_1_single_press: | |
name: action_for_button_1_single_press | |
description: Action to run when you single-press Button 1 | |
default: [] | |
selector: | |
action: | |
action_for_button_1_double_press: | |
name: action_for_button_1_double_press | |
description: Action to run when you double-press Button 1 | |
default: [] | |
selector: | |
action: | |
action_for_button_1_hold_and_release: | |
name: action_for_button_1_hold_and_release | |
description: Action to run when you hold and release Button 1 | |
default: [] | |
selector: | |
action: | |
action_for_button_2_single_press: | |
name: action_for_button_2_single_press | |
description: Action to run when you single-press Button 2 | |
default: [] | |
selector: | |
action: | |
action_for_button_2_double_press: | |
name: action_for_button_2_double_press | |
description: Action to run when you double-press Button 2 | |
default: [] | |
selector: | |
action: | |
action_for_button_2_hold_and_release: | |
name: action_for_button_2_hold_and_release | |
description: Action to run when you hold and release Button 2 | |
default: [] | |
selector: | |
action: | |
action_for_button_3_single_press: | |
name: action_for_button_3_single_press | |
description: Action to run when you single-press Button 3 | |
default: [] | |
selector: | |
action: | |
action_for_button_3_double_press: | |
name: action_for_button_3_double_press | |
description: Action to run when you double-press Button 3 | |
default: [] | |
selector: | |
action: | |
action_for_button_3_hold_and_release: | |
name: action_for_button_3_hold_and_release | |
description: Action to run when you hold and release Button 3 | |
default: [] | |
selector: | |
action: | |
action_for_button_4_single_press: | |
name: action_for_button_4_single_press | |
description: Action to run when you single-press Button 4 | |
default: [] | |
selector: | |
action: | |
action_for_button_4_double_press: | |
name: action_for_button_4_double_press | |
description: Action to run when you double-press Button 4 | |
default: [] | |
selector: | |
action: | |
action_for_button_4_hold_and_release: | |
name: action_for_button_4_hold_and_release | |
description: Action to run when you hold and release Button 4 | |
default: [] | |
selector: | |
action: | |
action_for_button_5_single_press: | |
name: action_for_button_5_single_press | |
description: Action to run when you single-press Button 5 | |
default: [] | |
selector: | |
action: | |
action_for_button_5_double_press: | |
name: action_for_button_5_double_press | |
description: Action to run when you double-press Button 5 | |
default: [] | |
selector: | |
action: | |
action_for_button_5_hold_and_release: | |
name: action_for_button_5_hold_and_release | |
description: Action to run when you hold and release Button 5 | |
default: [] | |
selector: | |
action: | |
action_for_button_6_single_press: | |
name: action_for_button_6_single_press | |
description: Action to run when you single-press Button 6 | |
default: [] | |
selector: | |
action: | |
action_for_button_6_double_press: | |
name: action_for_button_6_double_press | |
description: Action to run when you double-press Button 6 | |
default: [] | |
selector: | |
action: | |
action_for_button_6_hold_and_release: | |
name: action_for_button_6_hold_and_release | |
description: Action to run when you hold and release Button 6 | |
default: [] | |
selector: | |
action: | |
trigger: | |
- platform: mqtt | |
topic: !input button_mqtt_action | |
payload: button_1_single | |
id: button_1_single_press | |
- platform: mqtt | |
topic: !input button_mqtt_action | |
payload: button_1_double | |
id: button_1_double_press | |
- platform: mqtt | |
topic: !input button_mqtt_action | |
payload: button_1_release | |
id: button_1_hold_and_release | |
- platform: mqtt | |
topic: !input button_mqtt_action | |
payload: button_2_single | |
id: button_2_single_press | |
- platform: mqtt | |
topic: !input button_mqtt_action | |
payload: button_2_double | |
id: button_2_double_press | |
- platform: mqtt | |
topic: !input button_mqtt_action | |
payload: button_2_release | |
id: button_2_hold_and_release | |
- platform: mqtt | |
topic: !input button_mqtt_action | |
payload: button_3_single | |
id: button_3_single_press | |
- platform: mqtt | |
topic: !input button_mqtt_action | |
payload: button_3_double | |
id: button_3_double_press | |
- platform: mqtt | |
topic: !input button_mqtt_action | |
payload: button_3_release | |
id: button_3_hold_and_release | |
- platform: mqtt | |
topic: !input button_mqtt_action | |
payload: button_2_release | |
id: button_2_hold_and_release | |
- platform: mqtt | |
topic: !input button_mqtt_action | |
payload: button_4_single | |
id: button_4_single_press | |
- platform: mqtt | |
topic: !input button_mqtt_action | |
payload: button_4_double | |
id: button_4_double_press | |
- platform: mqtt | |
topic: !input button_mqtt_action | |
payload: button_4_release | |
id: button_4_hold_and_release | |
- platform: mqtt | |
topic: !input button_mqtt_action | |
payload: button_5_single | |
id: button_5_single_press | |
- platform: mqtt | |
topic: !input button_mqtt_action | |
payload: button_5_double | |
id: button_5_double_press | |
- platform: mqtt | |
topic: !input button_mqtt_action | |
payload: button_5_release | |
id: button_5_hold_and_release | |
- platform: mqtt | |
topic: !input button_mqtt_action | |
payload: button_6_single | |
id: button_6_single_press | |
- platform: mqtt | |
topic: !input button_mqtt_action | |
payload: button_6_double | |
id: button_6_double_press | |
- platform: mqtt | |
topic: !input button_mqtt_action | |
payload: button_6_release | |
id: button_6_hold_and_release | |
action: | |
- choose: | |
- conditions: | |
- condition: trigger | |
id: button_1_single_press | |
sequence: | |
!input action_for_button_1_single_press | |
- conditions: | |
- condition: trigger | |
id: button_1_double_press | |
sequence: | |
!input action_for_button_1_double_press | |
- conditions: | |
- condition: trigger | |
id: button_1_hold_and_release | |
sequence: | |
!input action_for_button_1_hold_and_release | |
- conditions: | |
- condition: trigger | |
id: button_2_single_press | |
sequence: | |
!input action_for_button_2_single_press | |
- conditions: | |
- condition: trigger | |
id: button_2_double_press | |
sequence: | |
!input action_for_button_2_double_press | |
- conditions: | |
- condition: trigger | |
id: button_2_hold_and_release | |
sequence: | |
!input action_for_button_2_hold_and_release | |
- conditions: | |
- condition: trigger | |
id: button_3_single_press | |
sequence: | |
!input action_for_button_3_single_press | |
- conditions: | |
- condition: trigger | |
id: button_3_double_press | |
sequence: | |
!input action_for_button_3_double_press | |
- conditions: | |
- condition: trigger | |
id: button_3_hold_and_release | |
sequence: | |
!input action_for_button_3_hold_and_release | |
- conditions: | |
- condition: trigger | |
id: button_4_single_press | |
sequence: | |
!input action_for_button_4_single_press | |
- conditions: | |
- condition: trigger | |
id: button_4_double_press | |
sequence: | |
!input action_for_button_4_double_press | |
- conditions: | |
- condition: trigger | |
id: button_4_hold_and_release | |
sequence: | |
!input action_for_button_4_hold_and_release | |
- conditions: | |
- condition: trigger | |
id: button_5_single_press | |
sequence: | |
!input action_for_button_5_single_press | |
- conditions: | |
- condition: trigger | |
id: button_5_double_press | |
sequence: | |
!input action_for_button_5_double_press | |
- conditions: | |
- condition: trigger | |
id: button_5_hold_and_release | |
sequence: | |
!input action_for_button_5_hold_and_release | |
- conditions: | |
- condition: trigger | |
id: button_6_single_press | |
sequence: | |
!input action_for_button_6_single_press | |
- conditions: | |
- condition: trigger | |
id: button_6_double_press | |
sequence: | |
!input action_for_button_6_double_press | |
- conditions: | |
- condition: trigger | |
id: button_6_hold_and_release | |
sequence: | |
!input action_for_button_6_hold_and_release | |
default: [] | |
mode: restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment