Z2M - Philips Hue Tap Switch

I took the Blueprint that @harbri created for the Dimmer Switch and created a Hue Tap version out of it.

This blueprint will let you configure each button of a Philips Hue Tap Switch which is paired with Zigbee2MQTT.

Blueprint

Click the badge to import this Blueprint: (needs Home Assistant Core 2021.3 or higher)
Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Or import this Blueprint by using the forum topic URL:

blueprint:
  name: Z2M - Hue Tap Switch 4 buttons
  description: 'Use the individual buttons of the Hue Tap switch to control an action by a tap.'
  domain: automation
  input:
    dimmer:
      name: Hue Tap switch
      description: Hue Tap Switch to use (Zigbee2mqtt Action Sensor)
      selector:
        entity:
          domain: sensor
    button_1:
      name: Button Single Dot
      description: Action to run on click of single dot button
      default: []
      selector:
        action: null
    button_2:
      name: Button Two Dots
      description: Action to run on click of two dot button
      default: []
      selector:
        action: null
    button_3:
      name: Button Three Dots
      description: Action to run on click of three dot button
      default: []
      selector:
        action: null
    button_4:
      name: Button Four Dots
      description: Action to run on click of four dot button
      default: []
      selector:
        action: null
mode: restart
max_exceeded: silent
trigger:
- platform: state
  entity_id: !input 'dimmer'
  attribute: action
action:
- variables:
    command: '{{ trigger.to_state.state }}'
- choose:
  - conditions:
    - '{{ command == ''press_1'' }}'
    sequence: !input button_1
  - conditions:
    - '{{ command == ''press_2'' }}'
    sequence: !input button_2
  - conditions:
    - '{{ command == ''press_3'' }}'
    sequence: !input button_3
  - conditions:
    - '{{ command == ''press_4'' }}'
    sequence: !input button_4
1 Like

Hi :slight_smile:

Recently your blueprint doesn’t work anymore, so while searching I found this issue on the Z2M Github.

We need to change this :

  • toggle β†’ press_1
  • recall_scene_0 β†’ press_2
  • recall_scene_1 β†’ press_3
  • recall_scene_2 β†’ press_4

Thanks for the heads-up. I just adjusted the code to match the change in z2m.

Let me know if you run into any other issues.