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

I haven’t fixed that yet, I will try to look at it soon

@coalfield What I do for this personally is I use a helper entity like a switch or a button for override states - in my motion automation blueprints I check if that override entity is on and changed within X minutes

Then I just switch that entity on from anything I want to override e.g. smart button actions

Your controller topic is incorrect, did you get this working?

No, I ordered this through amazon as a standalone button. Should I try resetting it anyway?

Are you using the HUE integration or Z2M?

If using the HUE integration go to the devices then your button, you should see both a battery indicator and a button event.

If you see both then you don’t need to reset, just send me a screenshot of the MODEL and MANUFACTURER as it might have changed on yours.

(Don’t post your MAC or personal info here)

Thank you for helping @TheHolyRoger ! It does have a battery indicator and a button.

Here’s what I have:

No worries, how is this connected to HA? At the moment this blueprint only supports HUE, ZHA and Zigbee2MQTT

I thought it was connected via Hue, but now that I’m looking at the screenshot it says connected via HomeBridge. I don’t have a hue plugin in HomeBridge though…

What have I done?!

Haha I don’t actually know…

Look through your device pages and see which integration this is using. I’ve never seen HUE devices connected via HomeBridge to be honest.

Do you have a HUE bridge? You’ll need a HUE bridge to use the HUE integration in HA.

If you don’t have a HUE bridge then we’ll have to do a bunch of steps to work out how the button works in homebridge

Okay, I think I stupidly named my Hue Bridge “HomeBridge” which is why it shows that.

Its connected via the Hue bridge.

This is my bridge info:

Screenshot 20240829 at 18.23@2x

I’ve just pushed an update to github, give that a go

1 Like

Brilliant! It worked!

Thank you so much!

1 Like

Great stuff :slight_smile:

I’m just quickly testing it out. It seems to all work out except the 4th and 5th button press releases. Is there a trick to those?

No they shouldn’t be any different… did you make sure the text helper text limit is enough?

As yours is a newer version there might be something different going on.

Go to developer tools > events, listen to hue_event and then DM me the log after pressing the button 5 times

A very big “thank you” to you, @TheHolyRoger, your Blueprint works 1A! :+1:
Exactly as the title promises: 5 press actions + hold-to-dim, that’s all I need.

Finally we can control our bathroom light without Alexa (not everyone here can always remember the names of the scenes). And we can quickly switch off the light when we leave the bathroom after it was previously switched on by the motion detector (for some people here it takes too long for it to happen automatically).

Thanks again for all the work that went into this!

Unfortunately, I must have rejoiced too soon. I experimented a little with the settings, but now the dimming no longer works properly. It does dim when you press and hold, but the light returns to 100% when you let go. My settings:

alias: Hue Button Badezimmer BP THR
description: ""
use_blueprint:
  path: TheHolyRoger/Philips_HUE_SmartButton.yaml
  input:
    controller_topic: zigbee2mqtt/HUE Button Badezimmer/action
    helper_last_controller_event: input_text.huebuttonbad_texthelfer
    hold_to_dim_entity: light.oberlicht
    scene_first_release: scene.oberlicht_1_oberlicht_gemutlich
    scene_second_release: scene.oberlicht_2_oberlicht_weiss
    scene_third_release: scene.oberlicht_5_oberlicht_rot
    scene_fourth_release: scene.oberlicht_3_oberlicht_sehr_gemutlich
    scene_fifth_release: scene.oberlicht_4_oberlicht_blau
    hold_to_dim_brightness_step: 16
    button_toggle_dim_entity_first_press: true

What could be the reason? Maybe it’s better to try again without the second to fifth press. Let’s see…

Edit:
I have deactivated the automation described above and created a new one without scenes for one to five presses. Otherwise, I also left the default settings: Then it works, when dimmed and released at the desired illuminance, the illuminance then achieved remains. I think I’ll leave it like this for now.

Strange, have you got one text helper for each button or are buttons sharing the same helper?

Is it running the first release scene when you let go after holding?

So far I have only integrated one HUE button in HA (via Z2M), I wanted to see how it works first. So a button and a text helper.
Yes, no matter where I’m coming from, i.e. no matter what state the light is in: as soon as the button is held for a long time (i.e. the light dimmed) and then released, the first scene is set.
As written in the edit above: If I leave out all the scenes, it works fine.