Last active
September 23, 2025 22:09
-
-
Save thomasmaxson/730d83fa9971097dc66a60a77a02d28c 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 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
| # 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 Remote Control | |
| description: Control devices with your Philips Hue Tap remote. | |
| author: Thomas Maxson | |
| source_url: https://gist.github.com/thomasmaxson/730d83fa9971097dc66a60a77a02d28c | |
| homeassistant: | |
| min_version: 2024.6.0 | |
| domain: automation | |
| input: | |
| remote: | |
| name: Philips Hue Tap remote control | |
| description: Philips Hue Tap remote used to trigger actions. | |
| selector: | |
| device: | |
| multiple: false | |
| filter: | |
| - integration: mqtt | |
| manufacturer: Philips | |
| model: Hue tap | |
| 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 | |
| variables: | |
| trigger_command: "{{ trigger.to_state.state }}" | |
| triggers: | |
| - trigger: state | |
| entity_id: !input "remote" | |
| attribute: action | |
| conditions: | |
| - condition: template | |
| value_template: "{{ var_remote | count > 0 }}" | |
| actions: | |
| - choose: | |
| - conditions: | |
| - "{{ trigger_command == 'press_1' }}" | |
| sequence: !input action_press_dot_1 | |
| - conditions: | |
| - "{{ trigger_command == 'press_2' }}" | |
| sequence: !input action_press_dot_2 | |
| - conditions: | |
| - "{{ trigger_command == 'press_3' }}" | |
| sequence: !input action_press_dot_3 | |
| - conditions: | |
| - "{{ trigger_command == 'press_4' }}" | |
| sequence: !input action_press_dot_4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey Thomas, I stumbled on your blueprint, seems nice!
After importing it, I set up an automation but get an error when saving:
Message malformed: Unknown entity registry entry ec7adf9f5145a3565bf2e55c5afc4207. This seems to be the ID of my [Z2M device's] Hue Tap when I selected it via the "remote" input dropdown.Here's the generated automation:
Here's some details about the Z2M entry in HA:
Here's the log from Z2M:
I tried replacing the entity ID (
ec7adf9f5145a3565bf2e55c5afc4207) withsalon_interrupteur_huetapand0x000000000047f221, but nothing works.Any idea of how to get the correct ID? Thanks!