Last active
April 10, 2025 23:16
-
-
Save freakshock88/672fc91e6981da4ca0c49e71b0c05032 to your computer and use it in GitHub Desktop.
philips_hue_tap_dial_switch_zigbee2mqtt_actions_blueprint
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: Zigbee2MQTT - Philips Hue Tap dial switch (8719514440937/8719514440999) actions | |
description: > | |
Define actions your Philips Hue Tap dial switch using Zigbee2MQTT. | |
This blueprint requires a MQTT topic for your button and the actions you want to take for each button press type. | |
domain: automation | |
input: | |
mqtt_topic: | |
name: MQTT Topic for device updates | |
description: MQTT topic for Philips Hue Tap dial switch. e.g. "zigbee2mqtt/Bedroom Bed Tap Dial Switch" | |
# Button 1 | |
remote_button_1_single_press: | |
name: Button 1 Single Press | |
description: Action to run on button 1 single press | |
default: [] | |
selector: | |
action: | |
remote_button_1_press_release: | |
name: Button 1 Press Release | |
description: Action to run on button 1 press release | |
default: [] | |
selector: | |
action: | |
remote_button_1_hold: | |
name: Button 1 Hold | |
description: Action to run on button 1 hold | |
default: [] | |
selector: | |
action: | |
remote_button_1_hold_release: | |
name: Button 1 Hold Release | |
description: Action to run on button 1 hold release | |
default: [] | |
selector: | |
action: | |
# Button 2 | |
remote_button_2_single_press: | |
name: Button 2 Single Press | |
description: Action to run on button 2 single press | |
default: [] | |
selector: | |
action: | |
remote_button_2_press_release: | |
name: Button 2 Press Release | |
description: Action to run on button 2 press release | |
default: [] | |
selector: | |
action: | |
remote_button_2_hold: | |
name: Button 2 Hold | |
description: Action to run on button 2 hold | |
default: [] | |
selector: | |
action: | |
remote_button_2_hold_release: | |
name: Button 2 Hold Release | |
description: Action to run on button 2 hold release | |
default: [] | |
selector: | |
action: | |
# Button 3 | |
remote_button_3_single_press: | |
name: Button 3 Single Press | |
description: Action to run on button 3 single press | |
default: [] | |
selector: | |
action: | |
remote_button_3_press_release: | |
name: Button 3 Press Release | |
description: Action to run on button 3 press release | |
default: [] | |
selector: | |
action: | |
remote_button_3_hold: | |
name: Button 3 Hold | |
description: Action to run on button 3 hold | |
default: [] | |
selector: | |
action: | |
remote_button_3_hold_release: | |
name: Button 3 Hold Release | |
description: Action to run on button 3 hold release | |
default: [] | |
selector: | |
action: | |
# Button 4 | |
remote_button_4_single_press: | |
name: Button 4 Single Press | |
description: Action to run on button 4 single press | |
default: [] | |
selector: | |
action: | |
remote_button_4_press_release: | |
name: Button 4 Press Release | |
description: Action to run on button 4 press release | |
default: [] | |
selector: | |
action: | |
remote_button_4_hold: | |
name: Button 4 Hold | |
description: Action to run on button 4 hold | |
default: [] | |
selector: | |
action: | |
remote_button_4_hold_release: | |
name: Button 4 Hold Release | |
description: Action to run on button 4 hold release | |
default: [] | |
selector: | |
action: | |
# Dial rotate left | |
remote_dial_rotate_left_step: | |
name: Dial rotate left step | |
description: Action to run on dial rotate left step | |
default: [] | |
selector: | |
action: | |
remote_dial_rotate_left_slow: | |
name: Dial rotate left slow | |
description: Action to run on dial rotate left slow | |
default: [] | |
selector: | |
action: | |
remote_dial_rotate_left_fast: | |
name: Dial rotate left fast | |
description: Action to run on dial rotate left fast | |
default: [] | |
selector: | |
action: | |
# Dial rotate right | |
remote_dial_rotate_right_step: | |
name: Dial rotate right step | |
description: Action to run on dial rotate right step | |
default: [] | |
selector: | |
action: | |
remote_dial_rotate_right_slow: | |
name: Dial rotate right slow | |
description: Action to run on dial rotate right slow | |
default: [] | |
selector: | |
action: | |
remote_dial_rotate_right_fast: | |
name: Dial rotate right fast | |
description: Action to run on dial rotate right fast | |
default: [] | |
selector: | |
action: | |
mode: restart | |
max_exceeded: silent | |
# Each option is explicitly defined as a trigger because sensor reports empty values as well. | |
# Not defining explicit triggers causes the automation to show up in the log multiple times per button press. | |
trigger: | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "button_1_press" | |
value_template: "{{ value_json.action }}" | |
id: "button_1_press" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "button_1_press_release" | |
value_template: "{{ value_json.action }}" | |
id: "button_1_press_release" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "button_1_hold" | |
value_template: "{{ value_json.action }}" | |
id: "button_1_hold" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "button_1_hold_release" | |
value_template: "{{ value_json.action }}" | |
id: "button_1_hold_release" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "button_2_press" | |
value_template: "{{ value_json.action }}" | |
id: "button_2_press" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "button_2_press_release" | |
value_template: "{{ value_json.action }}" | |
id: "button_2_press_release" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "button_2_hold" | |
value_template: "{{ value_json.action }}" | |
id: "button_2_hold" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "button_2_hold_release" | |
value_template: "{{ value_json.action }}" | |
id: "button_2_hold_release" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "button_3_press" | |
value_template: "{{ value_json.action }}" | |
id: "button_3_press" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "button_3_press_release" | |
value_template: "{{ value_json.action }}" | |
id: "button_3_press_release" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "button_3_hold" | |
value_template: "{{ value_json.action }}" | |
id: "button_3_hold" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "button_3_hold_release" | |
value_template: "{{ value_json.action }}" | |
id: "button_3_hold_release" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "button_4_press" | |
value_template: "{{ value_json.action }}" | |
id: "button_4_press" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "button_4_press_release" | |
value_template: "{{ value_json.action }}" | |
id: "button_4_press_release" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "button_4_hold" | |
value_template: "{{ value_json.action }}" | |
id: "button_4_hold" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "button_4_hold_release" | |
value_template: "{{ value_json.action }}" | |
id: "button_4_hold_release" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "dial_rotate_left_step" | |
value_template: "{{ value_json.action }}" | |
id: "dial_rotate_left_step" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "dial_rotate_left_slow" | |
value_template: "{{ value_json.action }}" | |
id: "dial_rotate_left_slow" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "dial_rotate_left_fast" | |
value_template: "{{ value_json.action }}" | |
id: "dial_rotate_left_fast" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "dial_rotate_right_step" | |
value_template: "{{ value_json.action }}" | |
id: "dial_rotate_right_step" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "dial_rotate_right_slow" | |
value_template: "{{ value_json.action }}" | |
id: "dial_rotate_right_slow" | |
- trigger: mqtt | |
topic: !input mqtt_topic | |
payload: "dial_rotate_right_fast" | |
value_template: "{{ value_json.action }}" | |
id: "dial_rotate_right_fast" | |
action: | |
- choose: | |
- conditions: | |
- condition: trigger | |
id: "button_1_press" | |
sequence: !input remote_button_1_single_press | |
- conditions: | |
- condition: trigger | |
id: "button_1_press_release" | |
sequence: !input remote_button_1_press_release | |
- conditions: | |
- condition: trigger | |
id: "button_1_hold" | |
sequence: !input remote_button_1_hold | |
- conditions: | |
- condition: trigger | |
id: "button_1_hold_release" | |
sequence: !input remote_button_1_hold_release | |
- conditions: | |
- condition: trigger | |
id: "button_2_press" | |
sequence: !input remote_button_2_single_press | |
- conditions: | |
- condition: trigger | |
id: "button_2_press_release" | |
sequence: !input remote_button_2_press_release | |
- conditions: | |
- condition: trigger | |
id: "button_2_hold" | |
sequence: !input remote_button_2_hold | |
- conditions: | |
- condition: trigger | |
id: "button_2_hold_release" | |
sequence: !input remote_button_2_hold_release | |
- conditions: | |
- condition: trigger | |
id: "button_3_press" | |
sequence: !input remote_button_3_single_press | |
- conditions: | |
- condition: trigger | |
id: "button_3_press_release" | |
sequence: !input remote_button_3_press_release | |
- conditions: | |
- condition: trigger | |
id: "button_3_hold" | |
sequence: !input remote_button_3_hold | |
- conditions: | |
- condition: trigger | |
id: "button_3_hold_release" | |
sequence: !input remote_button_3_hold_release | |
- conditions: | |
- condition: trigger | |
id: "button_4_press" | |
sequence: !input remote_button_4_single_press | |
- conditions: | |
- condition: trigger | |
id: "button_4_press_release" | |
sequence: !input remote_button_4_press_release | |
- conditions: | |
- condition: trigger | |
id: "button_4_hold" | |
sequence: !input remote_button_4_hold | |
- conditions: | |
- condition: trigger | |
id: "button_4_hold_release" | |
sequence: !input remote_button_4_hold_release | |
- conditions: | |
- condition: trigger | |
id: "dial_rotate_left_step" | |
sequence: !input remote_dial_rotate_left_step | |
- conditions: | |
- condition: trigger | |
id: "dial_rotate_left_slow" | |
sequence: !input remote_dial_rotate_left_slow | |
- conditions: | |
- condition: trigger | |
id: "dial_rotate_left_fast" | |
sequence: !input remote_dial_rotate_left_fast | |
- conditions: | |
- condition: trigger | |
id: "dial_rotate_right_step" | |
sequence: !input remote_dial_rotate_right_step | |
- conditions: | |
- condition: trigger | |
id: "dial_rotate_right_slow" | |
sequence: !input remote_dial_rotate_right_slow | |
- conditions: | |
- condition: trigger | |
id: "dial_rotate_right_fast" | |
sequence: !input remote_dial_rotate_right_fast |
@freakshock88 nevermind, it works as expected. Thank you for a great blueprint. I would love for this to be usable on other devices.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@freakshock88 I have button 1 linked to toggle an led light under my desk on button press. I then set button 1 hold to cycle led themes. However the button 1 press get triggered while I try to change themes and I end up having to press button 1 again to turn the lights back on. I'm going to try to move the button 1 press to button 1 release but is there a way to say button 1 went to hold state, cancel button 1 regular release and only do button 1 hold release?