I created a text helper, but not sure if I need to configure it differently as I still cant get things to work. Any tips?
can you show the rest of your config and what you wanna do?
Works like a charm for me.
Thank you very much !!
I got the simple press event worked using the button over zigbee2mqtt. But the multiple press event does not get triggert even with the related toggle enabled. Any idea which configuration may be wrong?
Can you share some more info? Unfortunately I don’t have Z2M so I did it by eye
Can you show the MQTT events you see while pressing the button, and if there are any automation traces for the secondary presses or if it didn’t trigger at all
Also just to confirm you’re using my new mqtt version above and not the one at the top of the thread
Hey Roger,
sure…
I’m using your latest version.
Furthermore, I have to correct me… the double press is recognized, but a single press not anymore if multi-press is enabled.
This one are the events from a single press:
Here you can see the trace from the single press (left one) and the double press (right one)
If you need something else, I will upload it asap.
Thank you for your help
Do you see any other traces for a single press? Maybe some cancelled ones?
If you know how to edit the blueprint code try changing the helper_debounce_delay: 10
line to maybe 0 and see what happens?
If not I’ll upload a version where you can change it as a setting
For me, you don’t have to upload a new version
I tried the 0 delay setting but with no effect.
You are right. There were some more traces. For one single press, I got three traces in the given sequence:
I played with the setting (UI) and my current workaround is to enable the “Always fire first short button release” action.
I think I can see the problem, the mqtt action topic sends additional payloads of “off” and “on” which seems to be some sort of toggler…
Is that a setting in z2m that maybe you can disable?
If not I’ll poke around in the blueprint and see if I can filter the trigger while keeping it working for all integrations
I updated the blueprint with different triggers Philips HUE Smart Button - 5 presses - #61 by TheHolyRoger
Do you want to see if that works better without the workaround?
Hi there,
Unfortunately I’m getting a “unsupported url” message when trying to import your blueprint.
Are you sure the import button is working ? other blueprints are importing without a problem.
Awesome, now it works flawless!
Thank you so much for your script and your help
I got the unsupported message too. So I just copied the code and add it manually as yaml script under the /blueprints/automation folder
Hm maybe it doesn’t like it not being the first post. I’ll update the main post tomorrow with the mqtt version since @EagleDev says it works
I checked the url, you need to remove the ?username= at the end of it. The current button displays your username @TheHolyRoger .
Once removed, it imports without any problem !
Still, I’m sorry but I must be dumb. I don’t get how to get this to work.
I select a button, and I select short press (first one of the list) → toggle → and I select a z2m group I previously created.
If I head to Z2M, I can see the button works in the logs (I see the on off events)
But when I save the automation and press the button, the event is not triggered at all. It’s like of this button was not pressed. What am I doing wrong ?
here is the automation yaml:
alias: "Interrupteur : Chambre Raph et Cel"
description: ""
use_blueprint:
path: TheHolyRoger/philips-hue-smart-button-5-presses.yaml
input:
helper_last_controller_event: input_text.dimmer_switches_events
action_button_short_release:
- service: light.toggle
data: {}
target:
device_id: f66322ddc89251787f6b1fb19b18f1f9
controller_device: cc24f0a084209f0e2b766438128636a9
I use the exact same button in an automation created from scratch, where I tell it to light the same Z2M group on an on and off event, with no problems.
like this :
alias: "Chambre Raph et Cel : Allumage"
description: ""
trigger:
- platform: device
domain: mqtt
device_id: cc24f0a084209f0e2b766438128636a9
type: action
subtype: "on"
discovery_id: 0x0017880108937253 action_on
condition: []
action:
- service: light.turn_on
data: {}
target:
area_id: chambre_raph_et_cel
mode: single
I think you were using the non-mqtt version as you changed the import URL. I’ve updated the main topic now so if you import it again you should get the MQTT version.
You’ll see it uses mqtt topic instead of a device id
My word, I’m struggling with this… I’ve managed to do so many technical things in Home Assistant but using this blue print with MQTT and Hue Button so I can have multiple clicks is totally got me stumped. If anyone has an idiots step by step guide I’d love to see it! Thanks for what you are doing… hopefully one day my skill level will be where it needs to be to make this work!
Can you share your config and what’s working/not working?
You’ll need to make sure you’re using the latest version of the blueprint from yesterday which includes the MQTT topic setting