Philips HUE Smart Button - 5 press actions + hold-to-dim

Okay I’ve also actually just updated the main blueprint :slight_smile:

It now has a few new options at the bottom for dimming.

You can now enable toggling the configured Dim Light Entity on the first button press - without needing to setup a custom action.

You can also enable hold to dim functionality and optionally change the brightness step value when increasing/decreasing

To use these functions you don’t need to change any other “long press”/“long release” options, can leave those actions blank.

Thinking about this some more… Are you able to force all the buttons to use the same MQTT action topic?

If so then you could use one automation for all of them :slight_smile:

This sounds fantastic and was something I really wanted. However, I went to try out the new blueprint and it actually stops my automation from working altogether (not sure why, the automation trace shows it was never called).

I am using zigbee2mqtt and it was all working fine with the prior version (with no dim options).

Any ideas?

1 Like

Aha a tester :slight_smile:

Thank you sir there was a bug in the mqtt code. I’ve updated the main blueprint so have a try now

:slight_smile:

Yes it’s working again now :tada: thank you!!

A few things:

  • Dimming works which is great, however at the end when I let go, it will always also trigger the single press command (which i have set to toggle light), so it will go dim, dim, dim then turn off at the end
  • It dims only one direction, not sure if that’s intended. If i have it set to dim down then it dims down then stops and never changes again. Is it supposed to reverse when it gets to the end if I keep holding down?
  • I couldn’t work out what “Enable Toggle Dim Light Entity First Press” does. I have to set “toggle light” for the “Short button press release” to get my light to toggle on a single press

Awesome work though, this is a great blueprint to make it much easier to configure the hue smart button.

Unfortunately the first one is due to z2m not sending a different action for long hold release - i’ll have to have a think how to handle that.

Dimming in one direction - for me it goes all the way down and then back up etc. Not sure why that’s not working for you… can you show me the brightness state for the light when it gets all the way down?

Third one again works for me as intended … maybe your light has different attributes to mine?

Ahh no worries. Will leave it with you. Not sure if it’s possible to do something like “if was dimming and button release is within dim time interval then stop dim”.

I tested it out more, no matter the original state, it dims down, down down, then eventually it gets to zero (off) after which is goes up one notch, then it goes down again (off) and repeats (on/off/on/off).

I was a bit confused what that toggle is supposed to do. If i turn it ON, then i should be able to leave the “Short button press release.” option empty and the light will toggle on/off with a single press? It’s not a big deal either way because I just set “Short button press release.” to toggle light and it works fine.

When the light turns back on in the dimming on/off loop does it turn on to full brightness or low brightness? I think that’s what I haven’t counted for in my blueprint.

Yeah if you enable “Enable Toggle Dim Light Entity First Press” then you should be able to leave the single press action empty.

Can you try manually switching the light to off and then see what happens with “Enable Toggle Dim Light Entity First Press” and do the same for manually switching it on? I’m wondering it’s a bug in my state check. For me it works fine with both single lights and light groups as the “Dim Light Entity”

Hey man try this update, you’ll need to manually update your local blueprint, if it works for you to fix the long hold release issue then I’ll update the main post :slight_smile:

Edit: see below

1 Like

In fact I just tweaked the dimming logic again so try this one:

I tried this one but the dimming no longer triggers. Not sure how to debug, is the trace helpful?

It seems to be coming back on quite dim, pretty sure it’s the “dim interval”. So it’s just alternating between off and a single step of the dim interval.

Where should I look to report back? The automation trace? If I switch it off and press it does trigger the automation but the state of the light is not changed. Would the automation trace be helpful?

Yeah if you can send me a few automation traces it would be great. For each set of actions there’ll be at least 2 traces so the more info the better. The full trace would be great otherwise screenshots of the different tabs

You can also listen to the ahb_controller_event events and show me the output of that, it will show me the order things were triggered in

Ok I will DM them over to you now.

I looked at the events and they all seem exactly as they should be. Eg. dimming is hold/hold/hold/release.

Ok in the second set the issue is that the Dim Light Entity is blank… is it definitely set in your blueprint config?

Oops, that’s embarrassing. You are right it wasn’t set. I had so many copies of the blueprint and I forgot to configure that one.

After setting it, the dimming worked again, but still has the same issues as the prior version (dimming goes down but does not go back up, release after dimming triggers the single press action).

No worries :slight_smile: ok cool, can you send me traces with this new version and then I should be able to work out what’s going on

For anyone curious we resolved all this, was a mixture of things including config errors but I’ve added notifications to the automation for bad config among other things

To add, if you create the text input helper via the HA UI, the default length is 100, which is not long enough in this case so it needs to be modified (@TheHolyRoger recommended 1000).

1 Like

Yeah I use 1000 in mine but 500 will be enough too which is what I’ve just set the blueprint check at, should have put it in the description too really…

1 Like