Skip to content

Instantly share code, notes, and snippets.

@inakianduaga
Last active March 15, 2025 14:26
Show Gist options
  • Save inakianduaga/f38bdbf752066fd3893a95e49a3bef65 to your computer and use it in GitHub Desktop.
Save inakianduaga/f38bdbf752066fd3893a95e49a3bef65 to your computer and use it in GitHub Desktop.
Update implementation
blueprint:
name: Philips Hue Tap Controller (Optimized)
description: Automate actions for each button on a Philips Hue Tap device.
domain: automation
input:
tap_device:
name: Philips Hue Tap Device
description: Select the Hue Tap device
selector:
device:
integration: hue
manufacturer: Signify Netherlands B.V.
model: Hue tap switch (ZGPSWITCH)
main_button_action:
name: Main Button Action
description: Action for the main button (button 1)
default: []
selector:
action: {}
button_2_action:
name: Button 2 Action
description: Action for the second button (button 2)
default: []
selector:
action: {}
button_3_action:
name: Button 3 Action
description: Action for the third button (button 3)
default: []
selector:
action: {}
button_4_action:
name: Button 4 Action
description: Action for the fourth button (button 4)
default: []
selector:
action: {}
mode: restart
trigger:
- platform: event
event_type: hue_event
event_data:
device_id: !input tap_device
type: initial_press # Only triggers on button press
action:
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.event.data.subtype == 1 }}"
sequence: !input "main_button_action"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.subtype == 2 }}"
sequence: !input "button_2_action"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.subtype == 3 }}"
sequence: !input "button_3_action"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.subtype == 4 }}"
sequence: !input "button_4_action"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment