Skip to content

Instantly share code, notes, and snippets.

@julienma
Forked from thomasmaxson/remote_philips_hue_tap.yaml
Last active September 23, 2025 22:15
Show Gist options
  • Save julienma/03badb3981462543f0cc184918f36cd2 to your computer and use it in GitHub Desktop.
Save julienma/03badb3981462543f0cc184918f36cd2 to your computer and use it in GitHub Desktop.
Home Assistant Blueprint to control your devices with a Philips Hue Tap Switch using the MQTT integration.
# This blueprint uses a Philips Hue Tap Remote Control connected through MQTT.
# This blueprint allows you to run custom actions with the remote's buttons
#
# | Button Type | Interaction | Action Choices |
# | ----------- | ----------------- | ------------------- |
# | One Dot | Press | - Run custom action |
# | ----------- | ----------------- | ------------------- |
# | Two Dots | Press | - Run custom action |
# | ----------- | ----------------- | ------------------- |
# | Three Dots | Press | - Run custom action |
# | ----------- | ----------------- | ------------------- |
# | Four Dots | Press | - Run custom action |
# | ----------- | ----------------- | ------------------- |
blueprint:
name: Philips Hue Tap (MQTT trigger)
description: Trigger actions from a Philips Hue Tap remote via MQTT.
domain: automation
author: Julien Ma
source_url: https://gist.github.com/julienma/03badb3981462543f0cc184918f36cd2
homeassistant:
min_version: 2024.6.0
input:
mqtt_topic:
name: MQTT topic (action)
description: "Topic that publishes the Tap action payload (example: zigbee2mqtt/salon_interrupteur_huetap/action)"
selector:
text: {}
default_button_events:
name: Button Events
icon: mdi:gesture-tap
collapsed: false
input:
action_press_dot_1:
name: 1 Dot Button Press Event
description: The action to perform on _press_ of the **1 Dot Button**.
default: []
selector:
action: null
action_press_dot_2:
name: 2 Dots Button Press Event
description: The action to perform on _press_ of the **2 Dots Button**.
default: []
selector:
action: null
action_press_dot_3:
name: 3 Dots Button Press Event
description: The action to perform on _press_ of the **3 Dots Button**.
default: []
selector:
action: null
action_press_dot_4:
name: 4 Dots Button Press Event
description: The action to perform on _press_ of the **4 Dots Button**.
default: []
selector:
action: null
mode: restart
max: 3
max_exceeded: silent
triggers:
- trigger: mqtt
topic: !input mqtt_topic
actions:
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.payload == 'press_1' }}"
sequence: !input action_press_dot_1
- conditions:
- condition: template
value_template: "{{ trigger.payload == 'press_2' }}"
sequence: !input action_press_dot_2
- conditions:
- condition: template
value_template: "{{ trigger.payload == 'press_3' }}"
sequence: !input action_press_dot_3
- conditions:
- condition: template
value_template: "{{ trigger.payload == 'press_4' }}"
sequence: !input action_press_dot_4
default: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment