Last active
February 15, 2023 19:44
-
-
Save vandalon/20649ce1fbe5d91902d9c17f27751254 to your computer and use it in GitHub Desktop.
Z2M - Philips Hue Tap dial switch
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 - Philips Hue Tap dial switch (8719514440937/8719514440999) actions | |
description: 'Define actions your Philips Hue Tap dial switch using Zigbee2MQTT. | |
Use the controller name as defined in Z2M e.g. (Livingroom Switch). | |
' | |
domain: automation | |
input: | |
controller: | |
name: (Zigbee2MQTT) Controller Name | |
description: The name of the controller as defined in z2m (e.g. Livingroom Switch) | |
default: "" | |
base_topic: | |
name: (Zigbee2MQTT) Base mqtt topic | |
description: The base topic as configured in z2m | |
default: zigbee2mqtt | |
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: {} | |
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: {} | |
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: {} | |
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: {} | |
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: {} | |
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: {} | |
source_url: https://gist.github.com/vandalon/20649ce1fbe5d91902d9c17f27751254 | |
mode: restart | |
max_exceeded: silent | |
trigger_variables: | |
base_topic: !input "base_topic" | |
controller: !input "controller" | |
trigger: | |
- platform: mqtt | |
topic: "{{ base_topic ~ '/' ~ controller }}" | |
condition: | |
- condition: template | |
value_template: > | |
{{ trigger.payload_json.action is defined }} | |
action: | |
- variables: | |
action: '{{ trigger.payload_json.action }}' | |
- choose: | |
- conditions: '{{ action == ''button_1_press'' }}' | |
sequence: !input remote_button_1_single_press | |
- conditions: '{{ action == ''button_1_press_release'' }}' | |
sequence: !input remote_button_1_press_release | |
- conditions: '{{ action == ''button_1_hold'' }}' | |
sequence: !input remote_button_1_hold | |
- conditions: '{{ action == ''button_1_hold_release'' }}' | |
sequence: !input remote_button_1_hold_release | |
- conditions: '{{ action == ''button_2_press'' }}' | |
sequence: !input remote_button_2_single_press | |
- conditions: '{{ action == ''button_2_press_release'' }}' | |
sequence: !input remote_button_2_press_release | |
- conditions: '{{ action == ''button_2_hold'' }}' | |
sequence: !input remote_button_2_hold | |
- conditions: '{{ action == ''button_2_hold_release'' }}' | |
sequence: !input remote_button_2_hold_release | |
- conditions: '{{ action == ''button_3_press'' }}' | |
sequence: !input remote_button_3_single_press | |
- conditions: '{{ action == ''button_3_press_release'' }}' | |
sequence: !input remote_button_3_press_release | |
- conditions: '{{ action == ''button_3_hold'' }}' | |
sequence: !input remote_button_3_hold | |
- conditions: '{{ action == ''button_3_hold_release'' }}' | |
sequence: !input remote_button_3_hold_release | |
- conditions: '{{ action == ''button_4_press'' }}' | |
sequence: !input remote_button_4_single_press | |
- conditions: '{{ action == ''button_4_press_release'' }}' | |
sequence: !input remote_button_4_press_release | |
- conditions: '{{ action == ''button_4_hold'' }}' | |
sequence: !input remote_button_4_hold | |
- conditions: '{{ action == ''button_4_hold_release'' }}' | |
sequence: !input remote_button_4_hold_release | |
- conditions: '{{ action == ''dial_rotate_left_step'' }}' | |
sequence: !input remote_dial_rotate_left_step | |
- conditions: '{{ action == ''dial_rotate_left_slow'' }}' | |
sequence: !input remote_dial_rotate_left_slow | |
- conditions: '{{ action == ''dial_rotate_left_fast'' }}' | |
sequence: !input remote_dial_rotate_left_fast | |
- conditions: '{{ action == ''dial_rotate_right_step'' }}' | |
sequence: !input remote_dial_rotate_right_step | |
- conditions: '{{ action == ''dial_rotate_right_slow'' }}' | |
sequence: !input remote_dial_rotate_right_slow | |
- conditions: '{{ action == ''dial_rotate_right_fast'' }}' | |
sequence: !input remote_dial_rotate_right_fast |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment