That doesn’t sound right, the topic should end in /action
- you should see this topic in the device info somewhere in mqtt or z2m config
I’ve just pushed some major changes to the blueprint for anyone who wants to update.
I’ve started using ZHA myself so I’ve tested this thoroughly with ZHA and my HUE buttons work the same also.
I changed a lot of the default settings to make it behave more like the HUE app by default.
There’s lot’s of configurable options, but personally I’m now happy just configuring the top few boxes + my scenes for each button. Much cleaner.
There’s now the option to pick 5 scenes, and then further down are the old action
based params.
If you configure both, both will fire. But since almost all of my buttons are purely scene based, I found this much cleaner.
There’s also new options to repeat the action/scene on each press - this defaults to 3.
With fast button pressing I found sometimes my scenes would get confused. With this repeat option only the final button press will be repeated, cleaning up “dodgy” light settings leftover from the rapid switching.
You might want to try the new update at some point it’s a simpler config now and I’ve also made it work properly with less than 5 actions/scenes configured
Hi Roger
First, thanks for this, it’s very useful! I’m new to HA so hope what I’m about to ask makes sense; If not please let me know what you need to see and I’ll try get details…
This obvs works well for Hue Smart buttons. In some places, however, I have a few 2/3 gang Zigbee push-button switches (Check out " MOES ZigBee Wireless Scene Switch Push Button Controller" on Amazon). Your blueprint mimics the fuctionality of the original smart button, but I’m hoping that doesn’t mean we have to use one of them…
These devices don’t present an ‘event’ like the Hue Smart button does. The just show some battery status. In automations, I can select buttons 1,2 etc, but not when I try use them on your blueprint.
Maybe a picture will explain better…
So, I guess, if you can figure out what I mean here… Can you make the blueprint work with these buttons?
Thanks for your help!
I’m a new user so can only add one image per post, so here’s another showing the device in ZHA:
These devices must expose events with a different event tag, unless they’re not supported in Hass properly…
Have a look in your event listeners and see if you can see them firing.
I can make another blueprint for them fairly easily if you send me the event outputs when you find them.
I’ve just made a similar blueprint for the sonoff 8 button RF remotes with scene switching on each button which is very cool haven’t put it on GitHub yet though as haven’t seen anyone else using these much
I think the event tag is zha_event
so listen to that event and send me the output.
Do a few button presses in different styles and make sure you note the timestamps for each one.
Do some hold presses as well.
Probably best to PM me as I’ll make a new thread for the blueprint
I think because I’m new I can’t DM yet (or I’m just not seeing the button, quite possible!). Anyway, here are the events you asked for. This is from a 3-gang version. I also have a 2-gang version elsewhere.
The long presses take about 4 seconds to register as long rather than short… Not sure if that can be set somewhere - possibly. Hope this is what you need.
Also, was thinking about what you said about making another blueprint… don’t know enough about them but wouldn’t it be good if just one could accommodate multiple switch types? Then you don’t need to maintain 2 versions? Or is that just going to be really messy?
Thanks again for your help!
Event 14 fired 19:26:
event_type: zha_event
data:
device_ieee: 70:ac:08:ff:fe:af:6c:b9
unique_id: 70:ac:08:ff:fe:af:6c:b9:3:0x0006
device_id: f91ee2863b08ee8fcf6c593432b34a02
endpoint_id: 3
cluster_id: 6
command: remote_button_short_press
args: []
params: {}
origin: LOCAL
time_fired: "2023-08-06T18:26:31.692151+00:00"
context:
id: 01H761KMMCY6DDGZXNK79RSNGX
parent_id: null
user_id: null
Event 13 fired 19:26:
event_type: zha_event
data:
device_ieee: 70:ac:08:ff:fe:af:6c:b9
unique_id: 70:ac:08:ff:fe:af:6c:b9:2:0x0006
device_id: f91ee2863b08ee8fcf6c593432b34a02
endpoint_id: 2
cluster_id: 6
command: remote_button_short_press
args: []
params: {}
origin: LOCAL
time_fired: "2023-08-06T18:26:29.865165+00:00"
context:
id: 01H761KJV9WV16MJZ8BKNPD7Z4
parent_id: null
user_id: null
Event 12 fired 19:26:
event_type: zha_event
data:
device_ieee: 70:ac:08:ff:fe:af:6c:b9
unique_id: 70:ac:08:ff:fe:af:6c:b9:1:0x0006
device_id: f91ee2863b08ee8fcf6c593432b34a02
endpoint_id: 1
cluster_id: 6
command: remote_button_short_press
args: []
params: {}
origin: LOCAL
time_fired: "2023-08-06T18:26:27.573381+00:00"
context:
id: 01H761KGKNJDC4D6FKQKNPGABA
parent_id: null
user_id: null
Event 11 fired 19:26:
event_type: zha_event
data:
device_ieee: 70:ac:08:ff:fe:af:6c:b9
unique_id: 70:ac:08:ff:fe:af:6c:b9:3:0x0006
device_id: f91ee2863b08ee8fcf6c593432b34a02
endpoint_id: 3
cluster_id: 6
command: remote_button_double_press
args: []
params: {}
origin: LOCAL
time_fired: "2023-08-06T18:26:24.183553+00:00"
context:
id: 01H761KD9QPKJDW8P7B2DSAD74
parent_id: null
user_id: null
Event 10 fired 19:26:
event_type: zha_event
data:
device_ieee: 70:ac:08:ff:fe:af:6c:b9
unique_id: 70:ac:08:ff:fe:af:6c:b9:2:0x0006
device_id: f91ee2863b08ee8fcf6c593432b34a02
endpoint_id: 2
cluster_id: 6
command: remote_button_double_press
args: []
params: {}
origin: LOCAL
time_fired: "2023-08-06T18:26:22.044323+00:00"
context:
id: 01H761KB6WN0QN6WMTQZ19RA4R
parent_id: null
user_id: null
Event 9 fired 19:26:
event_type: zha_event
data:
device_ieee: 70:ac:08:ff:fe:af:6c:b9
unique_id: 70:ac:08:ff:fe:af:6c:b9:1:0x0006
device_id: f91ee2863b08ee8fcf6c593432b34a02
endpoint_id: 1
cluster_id: 6
command: remote_button_double_press
args: []
params: {}
origin: LOCAL
time_fired: "2023-08-06T18:26:19.947215+00:00"
context:
id: 01H761K95BB7YB5SJ1S8SSCJPM
parent_id: null
user_id: null
Event 2 fired 19:36:
event_type: zha_event
data:
device_ieee: 70:ac:08:ff:fe:af:6c:b9
unique_id: 70:ac:08:ff:fe:af:6c:b9:3:0x0006
device_id: f91ee2863b08ee8fcf6c593432b34a02
endpoint_id: 3
cluster_id: 6
command: remote_button_long_press
args: []
params: {}
origin: LOCAL
time_fired: "2023-08-06T18:36:25.371510+00:00"
context:
id: 01H7625RCVV4XXMXA4587TDRNG
parent_id: null
user_id: null
Event 1 fired 19:36:
event_type: zha_event
data:
device_ieee: 70:ac:08:ff:fe:af:6c:b9
unique_id: 70:ac:08:ff:fe:af:6c:b9:2:0x0006
device_id: f91ee2863b08ee8fcf6c593432b34a02
endpoint_id: 2
cluster_id: 6
command: remote_button_long_press
args: []
params: {}
origin: LOCAL
time_fired: "2023-08-06T18:36:20.282977+00:00"
context:
id: 01H7625KDT4DKC94J4YG9XWFR0
parent_id: null
user_id: null
Event 0 fired 19:36:
event_type: zha_event
data:
device_ieee: 70:ac:08:ff:fe:af:6c:b9
unique_id: 70:ac:08:ff:fe:af:6c:b9:1:0x0006
device_id: f91ee2863b08ee8fcf6c593432b34a02
endpoint_id: 1
cluster_id: 6
command: remote_button_long_press
args: []
params: {}
origin: LOCAL
time_fired: "2023-08-06T18:36:15.389188+00:00"
context:
id: 01H7625EMX96F2MK949JDKYGDP
parent_id: null
user
It’s too messy to put it all in one unfortunately. Especially since your switch has 4 different buttons and the event logic works quite differently to the hue button. Will PM you now
Hi,
not sure if I did something wrong, but for the mutlipress actions it still processes all on the way to the intended one (so when doing a triple press it executes the action for double also) - is this intendended or my fault?
If it is due the code - is it possible to change mutli action part in a way that each additional multi press restarts a timer and as soon as this timer is finished the last saved mutli press is executed?
Short Click: Saves first short to input text AND Start timer multi click time out
no second click AND timer finished → Short click action
second short click: Save double click AND restart timer multi click time out
no 3rd short click AND timer finished → Double click action
3rd short click: Save triple click AND restart timer multi click time out
This way it should be possible to get rid of the issue to execute several multi press actions.
Meanwhile I solved this issue with an external timer (2 seconds) and an automation that is triggered when the timer finished. Inside the hue button automation based on this blue print every multiple press (2-5x) simply restarts this timer.
Now I can turn on/off my screen with a double press, my company notebooks docking station with a triple press and change the scene by pressing the button 4x/5x - all independently.
Yeah I can add this as an option quite easily I’ll post an update when I get a mo. Since this blueprint is aimed at mimicking the HUE native button functions, I did that by design as the hue button “cycles” through scenes on each press.
But yeah it will be an easy config option to add a short delay meaning only the final press actually gets executed
Are you sure you get it working internally only - first thougt it is possible, but at some point you need a trigger based on a timer and that imho needs an external/second automation.
What is also weird with the version I downloaded from github yesterday is, that it whenever I try to dim a light it switches to 0%/100% (depending on First Press Toggle Brightness %) after I release the button (while dimming it gets brighter/darker!), in the version I used so far it works as I expected:
With the slider First Press Toggle Brightness % I could adjust the brightness when turning on and after this I could dim brightness.
Can you reproduce this behaviour?
Hi. This blueprint seems really nice. However, I am on HA version 2023.9.2 where it seems that I cannot choose a size for the text helper. Thus I just get this error message. Apparently my text helper is too small
You need to enable “advanced options” for HA to change the text field lengths, and the options have moved around but it’s still there
Sorry for the late reply had a few things going on, will push an update soon
I have this set up with a button paired to a hue hub. it works well, save one issue I can’t figure out. We are adding actions to the first 3 button presses, one turns on a light, 2 turns on a few other lights, 3 turns a heater in the bathroom on.
One press works. Toggles light on and off. Two presses works as well. It does not turn on or off the 1 press light. Three presses and the 2 press lights turn on, and the heater does nothing. If I press the button rapidly I can sometimes get the 3 press action to fire.
I have played around with the settings quite a bit and can’t get it to reliably hit the 3 press. Anyone else have this issue?
Thanks.
Thanks for that! @TheHolyRoger maybe you can incorpoarte this in your documentation? I struggled a bit as well here. Maybe a hint, that advanced mode has to be active in the user settings?
Thanks for the blueprint as well you are amazing!
I can’t get this to work with my smart button, it doesn’t find any devices.
The old integration used to work but now that’s giving me a warning instead of calling my script (after removing my old hub integration and using the new bridge integration).
2023-12-10 23:05:56.868 INFO (MainThread) [homeassistant.components.automation.new_automation_2] New automation: Restarting
2023-12-10 23:05:56.872 INFO (MainThread) [homeassistant.components.automation.new_automation_2] New automation: Running automation actions
2023-12-10 23:05:56.872 INFO (MainThread) [homeassistant.components.automation.new_automation_2] New automation: Executing step delay 0:00:00.010000
2023-12-10 23:05:56.883 INFO (MainThread) [homeassistant.components.automation.new_automation_2] New automation: Executing step setting variables
2023-12-10 23:05:56.883 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'command' when rendering '{% if "type" in trigger.event.data %} {{ trigger.event.data.type }} {% else %} {{ trigger.event.data.command }} {% endif %}'
Any help or advice getting either template to work?
Thanks!
I know this is a really late reply but what happens if you turn off “(ADVANCED) Always fire first short button release”?