Z2M Philips Hue Dimmer Switch individual buttons

This blueprint will let you configure each button of a Philips Hue Dimmer Switch which is paired with Zigbee2MQTT. It supports commands for single and long-press of each button.

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 Dimmer switch 4 buttons
  description: 'Use the individual buttons of the Hue Dimmer Switch to control an action by either a click or a long press.
  '
  domain: automation
  input:
    dimmer:
      name: Hue Dimmer switch
      description: Hue Dimmer switch to use (Zigbee2mqtt Action Sensor)
      selector:
        entity:
          domain: sensor
    button_1:
      name: On Button - single click
      description: Action to run on click of On button
      default: []
      selector:
        action: {}
    button_2:
      name: Dim Up Button - single click
      description: Action to run on click of Dim Up button
      default: []
      selector:
        action: {}
    button_3:
      name: Dim Down Button - single click
      description: Action to run on click of Dim Down button
      default: []
      selector:
        action: {}
    button_4:
      name: Off Button - single click
      description: Action to run on click of Off button
      default: []
      selector:
        action: {}
    button_5:
      name: On Button - long press
      description: Action to run on long press of On button
      default: []
      selector:
        action: {}
    button_6:
      name: Dim Up Button - long press
      description: Action to run on long press of Dim Up button
      default: []
      selector:
        action: {}
    button_7:
      name: Dim Down Button - long press
      description: Action to run on long press of Dim Down button
      default: []
      selector:
        action: {}
    button_8:
      name: Off Button - long press
      description: Action to run on long press of Off button
      default: []
      selector:
        action: {}
mode: restart
max_exceeded: silent
trigger:
- platform: state
  entity_id: !input 'dimmer'
  attribute: action
action:
- variables:
    command: '{{ trigger.to_state.state }}'
- choose:
  - conditions:
    - '{{ command == ''on-press'' }}'
    sequence: !input button_1
  - conditions:
    - '{{ command == ''up-press'' }}'
    sequence: !input button_2
  - conditions:
    - '{{ command == ''down-press'' }}'
    sequence: !input button_3
  - conditions:
    - '{{ command == ''off-press'' }}'
    sequence: !input button_4
  - conditions:
    - '{{ command == ''on-hold'' }}'
    sequence: !input button_5
  - conditions:
    - '{{ command == ''up-hold'' }}'
    sequence: !input button_6
  - conditions:
    - '{{ command == ''down-hold'' }}'
    sequence: !input button_7
  - conditions:
    - '{{ command == ''off-hold'' }}'
    sequence: !input button_8
2 Likes

Great someone made this for de Hue Dimmer Switch true Zigbee2MQTT.

The only thing I’m missing is the double tap just like done with ZHA - Philips Hue Dimmer Switch (individual buttons with long presses)

Can you ad this to the blueprint?

ZHA - Philips Hue Dimmer Switch (individual buttons with long presses)

Just found this, and its exactly what I am looking for - however I noticed that I am unable to add groups of lights to the actions for the buttons? I have a number of light groups which I can control as a single entity via Home Assistant, but they aren’t available on this BluePrint - is that a limitation?

Thanks
Leacho

Have worked it out, I can just use a switch action and I can select the group them.

Is there any way you can include multiple presses as well as press and hold? Either way this is a fantastic blueprint!!

Thanks
Leacho

I’ve tried to add double/multi tap as well but it seems like zigbee2mqtt doesn’t publish these states so I can’t add them. However this is my very first attempt at creating a blueprint so if anyone else knows how to add double click please feel free to add it.

1 Like
Hi
The new Hue Dimmer (the RWL022) seems to use an underscore and not a hyphen. 
So I duplicated the conditions section of  the blueprint to include
 command == ''on_press''
1 Like

Hey all,

hopefully someone can help - today i changed my Zigbee channel from 11 to 25 to try and avoid some interference with wifi. I’ve gone through the process of repairing all my devices and setting everything back up - all seems to have gone really smoothly apart from this blueprint for my hue dimmer switches.

I cannot for the life of me get this blueprint to work - the automation never gets triggered. however if i setup a separate automation to look at a single “on-press” action it works perfectly and activates my scene.

Can anyone help? before i setup about 20 individual automations for my 3 dimmers with various actions :frowning_face:

Thanks

I had the same problem with this dimmer, after migrating my Z2M config.
Turned out I had missed setting “legacy” to false. Adding:

device_options:
  legacy: false

to my config solved the problem.

1 Like

I also had to do this change,
on-press => on_press
Also had to comment out the trigger attribute row:
#attribute: action
But now it works really nice, thank you!

Hello
Not getting this to work. I’ve done the trigger change and attribute change but no joy.
Anything else I need to change?
I’ve confirmed the dimmer is working with other automations.
Any help appreciated.
//

I also have issues, the main issue is, I cant find whats the issue…

I doe have some devices working nicely on Zigbee. The remotes of IKEA are working with mij Bleuprint. My Philips Hue Dimmer Switches (RWL021) are not. In the loggings I do see that they are sending the right messages, but somehow the Blueprint does not recognise it. I tried fiddling with the Legacy option, without any result. I keep it at false now. Is there something else I can try to fix this? I really would prefer to keep my Hue remotes in use.

Over the last couple of weeks I have tried a lot of different blueprints including this one. I finally got another one to work after some modifications.

I published my modifications here.

Hi. Im a newbee to this world. What command should i use for turn the lights on and off and to dim the lights up and down? is it just turn lights on in action field or what to do?