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

Got it working again!!!

Not sure what causes difference, but in the past the output to the helper looked like this

{“trigger_action”: “release”, “last_triggered”: “2023-05-13 11:06:25.432774+02:00”, “last_dim_direction”: “up”}

and you may recognize the space characters after the ‘:’ and ‘,’ characters, meanwhile this looks like this

“trigger_action”:“release”,“last_triggered”:“2023-05-14 11:54:38.466720+02:00”,“last_dim_direction”:“up”}

so all the spaces are gone, so what you need to do is change line 299 to

    | regex_match("^\{(\".*\":\".*\"(,)?)*\}$")) }}'

Ah brilliant thanks, I did wonder if that was it. Made the whitespace optional in the regex now and updated github :+1:

Hello,

Sorry i’m quite new in all of this but is it possible to run different scenes in order when using only the “Button initial press” ? I don’t want to have to double press or something else

For example :

  • I have 5 different scenes which turns the light in Blue / Red / Yellow / Purple / White)
  • Press “Button initial press” = Runs the Scene 1 (Blue)
  • press “Button initial press” = Runs the Scene 2 (Red)
  • press “Button initial press” = Runs the Scene 3 (Yellow)
  • press “Button initial press” = Runs the Scene 4 (Purple)
  • press “Button initial press” = Runs the Scene 5 (White)
  • press “Button initial press” = Runs the Scene 1 (Blue)
  • press “Button initial press” = Runs the Scene 2 (Red)
    etc…

Sorry I don’t get it… What you’re describing is exactly what this blueprint was made for :slight_smile: … you put the scenes in the different button press 1-5 etc

Maybe you just want to have a really long Helper - Multi Press delay ? At the moment it maxes out at 5 seconds but I could change the blueprint to allow for minutes or even hours easily

Sorry I finally found what I was looking for :

Thanks anyway :smiley:

Again, that’s exactly what this blueprint does without all the setup :joy: but whatever works for you :+1:

Thanks for the fix! Multi-press is working again!

Much appreciated!

I have one suggestion: Allow adding additional actions to a single press or single press toggle. There aren’t many options in the blueprint UI. Right now, I’m using the short press release to add additional smarts using other automations and sensors. It would be great to be able to do this from the blueprint UI. For example, on first press set temperature of light, transition time, disable other automation, start other automation, etc. etc. This could probably also be done manually in the YAML but I’m not literate enough to “just do it”… it takes a lot of trial and error. Having it in the UI would help tremendously and provide flexible way beyond what the blueprint is currently capable of.

Thanks again!

I’m not too sure what you mean? You can press the add action button to add as many actions as you want to each press.

Do you mean the “toggle light” option?

I could for example allow you to configure additional actions for when it toggles the light on or off

@TheHolyRoger is there an easy way to convert from the older blueprint to the new one which fixes multi button press?

It should just be a case of replacing the blueprint file, I don’t think I renamed any parameters or anything

If you’re doing it with the GUI I think you just go to the blueprints page and re-import - or delete it and then click the import button in this thread again

@TheHolyRoger
I added a Hue Smart Button via Zigbee2MQTT and added blueprint as well as a helper:

However, when running the automation of the blueprint, I receive the following error:
grafik

Invalid Config: Cannot have both MQTT topic and Controller Device set.

Any ideas?

I’m not trying to be rude, but what’s confusing about that message? :wink:

You need to remove the controller device from the config, but if my message isn’t clear, i"ll change it :slight_smile:

wow… sorry i guess I was confused by the * sign (thought it was mandatory)

All working now :slight_smile: Thanks!

No worries :slight_smile:
Fair point about the * sign, unfortunately the issue about this with HASS was closed long ago as stale even though it’s still a very present issue: `*` Showing on optional inputs in a blueprint · Issue #12268 · home-assistant/frontend · GitHub

The github stale bot is unfortunately the enemy of the user :slight_smile:

1 Like

Same problem here. With Hue I had it like first press warm white, second press cold white, third press red and otherwise off. I’m not able to recreate this behavior.

I tried the following but I cannot set the lights off with the scenes anymore.

alias: Controller - Philips Hue Smart Button
description: ""
use_blueprint:
  path: TheHolyRoger/Philips_HUE_SmartButton.yaml
  input:
    helper_last_controller_event: >-
      input_text.philips_8718699693985_hue_smart_button_helper_last_controller_event
    controller_topic: zigbee2mqtt/Badezimmer Smart Button/action
    button_hold_to_dim: true
    button_toggle_dim_entity_first_press: true
    action_button_initial_press: []
    action_button_short_release:
      - service: scene.turn_on
        target:
          entity_id: scene.badezimmer_1_knopfdruck
        metadata: {}
    hold_to_dim_entity: light.badezimmer_deckenlichter
    action_button_double_press:
      - service: scene.turn_on
        target:
          entity_id: scene.badezimmer_2_knopfdruck
        metadata: {}
    action_button_triple_press:
      - service: scene.turn_on
        target:
          entity_id: scene.badezimmer_3_knopfdruck
        metadata: {}

Can somebody just tell me how to start in first short button press state? I mean I have configured it like activate a scene on double press, triple press and so on. The scene of the triple press is still active when I activate the light again after it was turned off. The original Hue behavior is that it gets back to the default scene (which I cannot configure here if I see it right)

You’re right, I didn’t account for that behaviour properly.

Firstly, there’s an additional config option you want to turn on which is:
Always fire first short button release

I’ve just pushed an update to github to correct the behaviour so that with your above config + this option, it will switch to the first scene when you’re turning the light on with a first press, or turn it off if it’s already on

1 Like

Thank you very much! Works now and feels great!

1 Like

Can’t get this to work :frowning:

Using 0x001788010b9df530 as the buttons MQTT topic as I’m using Zigbee2MQTT

Just doesn’t trigger the automation