Skip to content

Instantly share code, notes, and snippets.

@Marcocanc
Created March 8, 2026 21:43
Show Gist options
  • Select an option

  • Save Marcocanc/f581a9097c514ba97eb306562576d2b9 to your computer and use it in GitHub Desktop.

Select an option

Save Marcocanc/f581a9097c514ba97eb306562576d2b9 to your computer and use it in GitHub Desktop.
blueprint:
name: Philips Hue Wall Switch Module (929003017102) — Zigbee2MQTT
description: >
Automation blueprint for the Philips Hue Wall Switch Module (929003017102)
paired via Zigbee2MQTT.
Supports all device modes: **single_rocker**, **single_push_button**,
**dual_rocker**, and **dual_push_button**.
Configure actions for each button event below. Leave any action empty to
ignore that event.
**Note:** In dual rocker/push-button mode, only the left (input 1) button
sends actions. Right button events are included for forward compatibility.
domain: automation
source_url: https://www.zigbee2mqtt.io/devices/929003017102.html
input:
mqtt_topic:
name: Zigbee2MQTT Device Topic
description: >
The full MQTT topic for this device.
Example: `zigbee2mqtt/hue_wall_switch`
selector:
text:
# ── Single press ────────────────────────────────────────────────────────
action_left_press:
name: Left / Single — Press
description: >
Fired when the left button (or the only button in single mode) is
pressed. In single_rocker mode this is equivalent to `toggle`.
default: []
selector:
action:
action_right_press:
name: Right — Press
description: Fired when the right button is pressed (dual modes only).
default: []
selector:
action:
# ── Press release ────────────────────────────────────────────────────────
action_left_press_release:
name: Left / Single — Press Release
description: Fired when the left button is released after a short press.
default: []
selector:
action:
action_right_press_release:
name: Right — Press Release
description: Fired when the right button is released after a short press.
default: []
selector:
action:
# ── Hold ─────────────────────────────────────────────────────────────────
action_left_hold:
name: Left / Single — Hold
description: Fired while the left button is held down.
default: []
selector:
action:
action_right_hold:
name: Right — Hold
description: Fired while the right button is held down.
default: []
selector:
action:
# ── Hold release ─────────────────────────────────────────────────────────
action_left_hold_release:
name: Left / Single — Hold Release
description: Fired when the left button is released after a long hold.
default: []
selector:
action:
action_right_hold_release:
name: Right — Hold Release
description: Fired when the right button is released after a long hold.
default: []
selector:
action:
# ── Brightness (simulated, single rocker mode) ───────────────────────────
action_brightness_move_up:
name: Brightness Move Up
description: >
Fired when the device signals brightness should increase (simulated
brightness control, single rocker mode).
default: []
selector:
action:
action_brightness_move_down:
name: Brightness Move Down
description: >
Fired when the device signals brightness should decrease (simulated
brightness control, single rocker mode).
default: []
selector:
action:
action_brightness_stop:
name: Brightness Stop
description: >
Fired when brightness adjustment ends (simulated brightness control,
single rocker mode).
default: []
selector:
action:
# ── Toggle (single rocker mode) ──────────────────────────────────────────
action_toggle:
name: Toggle
description: >
Fired on a single press in single_rocker mode.
Use this **or** Left / Single — Press, not both.
default: []
selector:
action:
# ── Trigger ──────────────────────────────────────────────────────────────────
trigger:
- platform: mqtt
topic: !input mqtt_topic
# ── Variables ────────────────────────────────────────────────────────────────
variables:
action: "{{ trigger.payload_json.action | default('') }}"
# ── Conditions ───────────────────────────────────────────────────────────────
condition:
- condition: template
value_template: "{{ action != '' }}"
# ── Actions ──────────────────────────────────────────────────────────────────
action:
- choose:
- conditions: "{{ action == 'left_press' }}"
sequence: !input action_left_press
- conditions: "{{ action == 'right_press' }}"
sequence: !input action_right_press
- conditions: "{{ action == 'left_press_release' }}"
sequence: !input action_left_press_release
- conditions: "{{ action == 'right_press_release' }}"
sequence: !input action_right_press_release
- conditions: "{{ action == 'left_hold' }}"
sequence: !input action_left_hold
- conditions: "{{ action == 'right_hold' }}"
sequence: !input action_right_hold
- conditions: "{{ action == 'left_hold_release' }}"
sequence: !input action_left_hold_release
- conditions: "{{ action == 'right_hold_release' }}"
sequence: !input action_right_hold_release
- conditions: "{{ action == 'brightness_move_up' }}"
sequence: !input action_brightness_move_up
- conditions: "{{ action == 'brightness_move_down' }}"
sequence: !input action_brightness_move_down
- conditions: "{{ action == 'brightness_stop' }}"
sequence: !input action_brightness_stop
- conditions: "{{ action == 'toggle' }}"
sequence: !input action_toggle
mode: single
max_exceeded: silent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment