Guide to Philips hue wall switch

Hi, i have bought a hue wall switch.

Connected to ZHA (but i plan on using Zigbee2MQTT in the future) . i want to use my hue wall switch together with a double push switch. i want it to do the following.
Short press = toggle ledstrip on/off
double press = switch between 3 preset colors
long press = dim up/down either keeps cycling up and down

OR
long press 1 = dim up
long press 2 = dim down.

I want this to work for both of the push switches but i am a bit lost on the forum on how to do this.

I have found this Guide to hue wall switch push button, But i can’t seem to get this working. could someone please help me out with a more detailed guide?

i have found this forum post as well: https://community.home-assistant.io/t/how-to-configure-the-philips-hue-wall-module-to-use-push-button-momentary-type-wall-switches-zha/451125/27


I have a Zigbee button that suports short double and long press. I made an automation that has triggers for each of the three and then conditional actions based on which trigger happens. I don’t have anything on the long press currently. I’m not sure if something like this would work for you or not.

alias: Smart's Button
description: ""
triggers:
  - domain: mqtt
    device_id: aa5ba
    type: action
    subtype: single
    trigger: device
    id: Short
  - domain: mqtt
    device_id: aa5ba
    type: action
    subtype: double
    trigger: device
    id: Double
  - domain: mqtt
    device_id: aa5ba
    type: action
    subtype: hold
    trigger: device
    id: Long
conditions: []
actions:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - Short
        sequence:
          - action: switch.toggle
            metadata: {}
            data: {}
            target:
              entity_id: switch.s_light
      - conditions:
          - condition: trigger
            id:
              - Double
        sequence:
          - type: toggle
            device_id: fb7198e
            entity_id: 5eb20f1
            domain: light
      - conditions:
          - condition: trigger
            id:
              - Long
        sequence: []
mode: single

Thank you for this, i first need to get this Philips hue Working the way i want it to.

I have ditched ZHA and set up Zigbee2MQTT. I have added the philips hue wall switch and could set the device mode to dual push button.

Now i want to see what is triggered in this device.
it seems to have:
left_press
left_press_release

For holding we have:
left_press
‘left_hold’
‘left_hold_release’

Double tapping does not register
triple tapping does not register.

Can someone please tell me if the task i have thought of is achievable with this device.

[2/18/2026, 7:21:46 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch', payload '{"action":"left_press","battery":100,"device_mode":"dual_push_button","linkquality":112}'
[2/18/2026, 7:21:46 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch/action', payload 'left_press'
[2/18/2026, 7:21:46 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch', payload '{"action":"left_press_release","battery":100,"device_mode":"dual_push_button","linkquality":149}'
[2/18/2026, 7:21:46 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch/action', payload 'left_press_release'
[2/18/2026, 7:21:49 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch', payload '{"action":"left_press","battery":100,"device_mode":"dual_push_button","linkquality":160}'
[2/18/2026, 7:21:49 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch/action', payload 'left_press'
[2/18/2026, 7:21:50 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch', payload '{"action":"left_hold","battery":100,"device_mode":"dual_push_button","linkquality":120}'
[2/18/2026, 7:21:50 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch/action', payload 'left_hold'
[2/18/2026, 7:21:51 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch', payload '{"action":"left_hold","battery":100,"device_mode":"dual_push_button","linkquality":178}'
[2/18/2026, 7:21:51 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch/action', payload 'left_hold'
[2/18/2026, 7:21:51 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch', payload '{"action":"left_hold","battery":100,"device_mode":"dual_push_button","linkquality":120}'
[2/18/2026, 7:21:51 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch/action', payload 'left_hold'
[2/18/2026, 7:21:52 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch', payload '{"action":"left_hold_release","battery":100,"device_mode":"dual_push_button","linkquality":142}'
[2/18/2026, 7:21:52 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch/action', payload 'left_hold_release'
[2/18/2026, 7:21:55 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch', payload '{"action":"right_press","battery":100,"device_mode":"dual_push_button","linkquality":156}'
[2/18/2026, 7:21:55 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch/action', payload 'right_press'
[2/18/2026, 7:21:55 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch', payload '{"action":"right_press_release","battery":100,"device_mode":"dual_push_button","linkquality":102}'
[2/18/2026, 7:21:55 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch/action', payload 'right_press_release'
[2/18/2026, 7:21:59 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch', payload '{"action":"right_press","battery":100,"device_mode":"dual_push_button","linkquality":156}'
[2/18/2026, 7:21:59 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch/action', payload 'right_press'
[2/18/2026, 7:22:00 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch', payload '{"action":"right_hold","battery":100,"device_mode":"dual_push_button","linkquality":149}'
[2/18/2026, 7:22:00 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch/action', payload 'right_hold'
[2/18/2026, 7:22:01 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch', payload '{"action":"right_hold","battery":100,"device_mode":"dual_push_button","linkquality":145}'
[2/18/2026, 7:22:01 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch/action', payload 'right_hold'
[2/18/2026, 7:22:01 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch', payload '{"action":"right_hold","battery":100,"device_mode":"dual_push_button","linkquality":145}'
[2/18/2026, 7:22:01 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch/action', payload 'right_hold'
[2/18/2026, 7:22:02 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch', payload '{"action":"right_hold_release","battery":100,"device_mode":"dual_push_button","linkquality":91}'
[2/18/2026, 7:22:02 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch/action', payload 'right_hold_release'
[2/18/2026, 7:22:03 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch', payload '{"action":"right_press","battery":100,"device_mode":"dual_push_button","linkquality":94}'
[2/18/2026, 7:22:03 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch/action', payload 'right_press'
[2/18/2026, 7:22:03 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch', payload '{"action":"right_press_release","battery":100,"device_mode":"dual_push_button","linkquality":94}'
[2/18/2026, 7:22:03 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch/action', payload 'right_press_release'
[2/18/2026, 7:22:03 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch', payload '{"action":"right_press","battery":100,"device_mode":"dual_push_button","linkquality":91}'
[2/18/2026, 7:22:03 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch/action', payload 'right_press'
[2/18/2026, 7:22:03 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch', payload '{"action":"right_press_release","battery":100,"device_mode":"dual_push_button","linkquality":145}'
[2/18/2026, 7:22:03 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Hue wall switch/action', payload 'right_press_release'

As you already figured out by yourself, the Hue Wall Swich Module does not support double/triple click. This is a device limitation, not Z2M’s.

Thank you, that is correct. Using ZHA i was able to register double and triple clicks.

But how can i use the output of MQTT to have them as an input for controlling my lights- I would need a blueprint for this i think?

I asked AI how to do this, i will check later if this also works:

STEP 1 — Enable Python Scripts in Home Assistant

  1. Go to your Home Assistant config folder
  2. If the folder python_scripts does not exist:
    ➝ create it:
config/python_scripts/
  1. Open configuration.yaml
  2. Add this line (if not already present):
    python_script:
  3. Restart Home Assistant
    → Settings → System → Restart
    a { text-decoration: none; color: #464feb; } tr th, tr td { border: 1px solid #e6e6e6; } tr th { background-color: #f5f5f5; }

STEP 2 — Create the helper sensor

You must add the click‑counter sensor in configuration.yaml.

sensor:
  - platform: template
    sensors:
      hue_click_timer:
        friendly_name: "Hue Click Timer"
        value_template: "ok"
        attribute_templates:
          last: "0"
          clicks: 0

restart Home Assistant after saving
a { text-decoration: none; color: #464feb; } tr th, tr td { border: 1px solid #e6e6e6; } tr th { background-color: #f5f5f5; }

STEP 3 — Add the python script

Inside the folder:

config/python_scripts/

Create a file called:

set_state.py

Add this code

entity_id = data.get("entity_id")
state = data.get("state", None)

# Copy existing attributes
attr = hass.states.get(entity_id).attributes.copy() if hass.states.get(entity_id) else {}

# Add/update attributes
for k, v in data.items():
    if k not in ["entity_id", "state"]:
        attr[k] = v

# Set new state and attributes
hass.states.set(entity_id, state if state else "ok", attr)

STEP 4 — Import the English Blueprint

In Home Assistant go to:
Settings → Automations & Scenes → Blueprints → Import Blueprint
Choose: “Create from YAML”
Paste the entire blueprint
Save the blueprint.

blueprint:
  name: "Hue Wall Switch (MQTT) – Extended Click Logic"
  description: >
    Extends the Philips Hue Wall Switch Module (used via Zigbee2MQTT) with
    software-based single, double, and triple click detection, scene cycling,
    dimming via hold, and stop dimming on release.
    Works only with MQTT action payloads (e.g., left_press, left_hold, etc.)
  domain: automation

  input:
    mqtt_topic:
      name: MQTT Topic
      description: The MQTT action topic from Zigbee2MQTT (e.g. zigbee2mqtt/switch/action)
      selector:
        text:

    light_target:
      name: Light / Group Target
      description: The light(s) you want to control
      selector:
        target:
          entity:
            domain: light

    scenes:
      name: Scene List
      description: Provide a list of scenes for cycling when double/triple clicking
      default: []
      selector:
        object:

    dim_step:
      name: Dim Step Size
      description: Brightness percentage change per dim step
      default: 10
      selector:
        number:
          min: 1
          max: 50
          step: 1


variables:
  mqtt_topic: !input mqtt_topic
  scenes: !input scenes

trigger:
  - platform: mqtt
    topic: !input mqtt_topic

mode: restart

action:
  - variables:
      action: "{{ trigger.payload }}"
      now: "{{ now() }}"
      last: "{{ state_attr('sensor.hue_click_timer','last') }}"
      clicks: "{{ state_attr('sensor.hue_click_timer','clicks') | int }}"
      timeout_ms: 350

  # Process actions
  - choose:
      # HOLD → dim up
      - conditions: "{{ action == 'left_hold' }}"
        sequence:
          - service: light.turn_on
            target: !input light_target
            data:
              brightness_step_pct: "{{ dim_step }}"
              transition: 1

      # HOLD RELEASE → stop dimming
      - conditions: "{{ action == 'left_hold_release' }}"
        sequence:
          - service: light.turn_on
            target: !input light_target
            data:
              brightness_step_pct: 0

      # PRESS → increase click counter
      - conditions: "{{ action == 'left_press' }}"
        sequence:
          - service: python_script.set_state
            data:
              entity_id: sensor.hue_click_timer
              last: "{{ now }}"
              clicks: "{{ clicks + 1 }}"

      # PRESS RELEASE → decide single/double/triple click
      - conditions: "{{ action == 'left_press_release' }}"
        sequence:
          - delay: "00:00:0.35"    # wait to detect if more clicks follow
          - variables:
              final_clicks: "{{ state_attr('sensor.hue_click_timer','clicks') | int }}"
          - choose:

              # SINGLE CLICK → toggle
              - conditions: "{{ final_clicks == 1 }}"
                sequence:
                  - service: light.toggle
                    target: !input light_target

              # DOUBLE CLICK → next scene
              - conditions: "{{ final_clicks == 2 }}"
                sequence:
                  - choose:
                      - conditions: "{{ scenes | count > 0 }}"
                        sequence:
                          - service: scene.turn_on
                            target:
                              entity_id: >
                                {{ scenes[1] if scenes | count > 1 else scenes[0] }}

              # TRIPLE CLICK → previous (last) scene
              - conditions: "{{ final_clicks == 3 }}"
                sequence:
                  - choose:
                      - conditions: "{{ scenes | count > 0 }}"
                        sequence:
                          - service: scene.turn_on
                            target:
                              entity_id: "{{ scenes[-1] }}"

          # Reset click counter
          - service: python_script.set_state
            data:
              entity_id: sensor.hue_click_timer
              last: "{{ now }}"
              clicks: 0

STEP 5 — Create an automation using this blueprint

  1. Go to: Settings → Automations & Scenes → Create Automation → From Blueprint*
  2. Select: Hue Wall Switch (MQTT) – Extended Click Logic*

Now fill in the fields:
A) MQTT Topic
Enter the exact Zigbee2MQTT action topic for your Hue wall switch.
Typically:
zigbee2mqtt/<device_name>/action
zigbee2mqtt/hue_wall_switch/action

You can verify it in: Zigbee2MQTT → Device → “Exposes” → “Action”.

B) Light Target
Under “Light / Group Target” choose:
:arrow_right: light.led_strip (This will be the identity name of your end device)
a { text-decoration: none; color: #464feb; } tr th, tr td { border: 1px solid #e6e6e6; } tr th { background-color: #f5f5f5; }

C) Scene List (Optional)
If you want double/triple click to activate scenes, define them like:

- scene.relax
- scene.energy
- scene.concentrate

If you don’t use scenes, leave it empty — single‑click and dimming still work.
a { text-decoration: none; color: #464feb; } tr th, tr td { border: 1px solid #e6e6e6; } tr th { background-color: #f5f5f5; }

D) Dim Step
Choose how fast the LED strip dims on hold:

  • 5 = gentle
  • 10 = normal
  • 20 = fast
  • Default = 10

a { text-decoration: none; color: #464feb; } tr th, tr td { border: 1px solid #e6e6e6; } tr th { background-color: #f5f5f5; }

STEP 6 — Test the functions
Now test your Hue Wall Switch:

:heavy_check_mark: Single Click

→ toggles light.led_strip

:heavy_check_mark: Double Click

→ loads next scene (if scenes were defined)

:heavy_check_mark: Triple Click

→ loads previous (last) scene

:heavy_check_mark: Hold

→ dims up or down

:heavy_check_mark: Hold Release

→ stops dimming
Everything should now work smoothly.