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

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

Hi there,

I have another problem.

I use your blueprint to toggle z2m groups, and it always did work till now.

In Z2M, I have light groups, that are passed to HA. If I go here, as en example :

And I switch the light group on and off, it works 100% of the time and lights my lights on and off.

Problem is, when I run your blueprint, my lately added tuya switches, goes off, but never back on.

it’s crazy, because from the device that groups all the lights and switches itself, it just works !
here is one of the devices that goes off, but not back on :slight_smile:

Even weirder, as I told you, if my z2m light group device is on, and I trigger your blueprint, it goes OFF (the REAL light goes off), but the state of that device doesn’t get updated in HA, it remains “on” :slight_smile:

So:

  1. light is on

  2. I run the toggle on the z2m group

  3. all light are off, including the tuya plug (the blueprint WORKED)

  4. I run the blueprint again

  5. all lights of z2m groups are back on, except this one !

  6. I go back to Z2M, check the group, and can see the device is actually turned ON !

  7. same thing when checking in the Z2M group directly inside HA
    image

  8. If I then use the trigger inside HA, (see last screenshot) it works again, all lights are turning ON and OFF all the time I switch.

So for some reason, the blueprint is not triggering the actual light, while it do trigger the group. And on the other hand, acting on these groups from HA, directly, works 100% of the time.

any idea of why this could be happening ? :slight_smile:

No I’m not sure, that’s very strange, but I have had issues with hass’s “toggle” functionality before with other devices where some fall out of sync and then some are toggled off whilst others are toggled on… This does kind of look like it might be a similar issue.

I completely abandoned using any “toggle” services in my hass automations and do it manually now…

My blueprint does have these new actions to toggle your lights on a first button press, have you tried that? It’s the settings at the bottom for the “dim entity”. It doesn’t use the toggle service so it may work better