Very Easy Custom Philips Hue Dimmer Switch for Z2M(Zigbee2MQTT)

You need to use the name you entered (or was entered for you) for the device in Z2M not what you have in HA.

I just started messing with this. I suck at yaml but my code does have smooth dimming. I think if you mess with the % and transition it could be pretty customizable. Let me know if this works well.

alias: Livingroom dim
description: Dims livingroom when held
use_blueprint:
  path: patpac9/Hue_Dimmer_Switch_Easy_Custom_Buttons.yaml
  input:
    controller: Hallway hue switch
    down_held:
      - service: light.turn_on
        metadata: {}
        data:
          brightness_step_pct: -20
          transition: 2
        target:
          entity_id: light.livingroom
    up_held:
      - service: light.turn_on
        metadata: {}
        data:
          brightness_step_pct: 20
          transition: 2
        target:
          entity_id: light.livingroom

Hi. Thanks for your reply.

Iā€™ve tried your code and itā€™s better, but still not totally smooth. I could start playing with transition and brightness step but I would prefer to use mqtt.publish command, I read somewhere that it should be better than the other solution (brightness_step/brightness_step_pct). Any experience how to get that (mqtt.publish) to operate smoother?
Like I also mentioned in my first comment i use this code for my enOcean PTM 215Z and it operate like a charm, so I donā€™t know why itā€™s a problem when using Hue dimmer switch.

I have the same problem i cant not get the blueprint to work. I have tried both the friendly name and the mqqt id that was given at the time. I still dont get a response. if i set up my own automation i can get it to work.

Fairly new to HA and Z2M, but just discovered this blueprint and it is just what I needed. Thanks for sharing!

As a related question - I was initially attempting to set up this switch in Z2M using a bind. Has anyone had success with direct binding of this Hue Dimmer Switch to a light or set of lights using the Z2M GUI (Bind under device settings)?

Despite getting messages that the switch is bound to a light successfully i have had no luck getting a response using that methodā€¦ just curious if anyone had similar experience.