Closed Drealine closed 1 year ago
Might be a firmware issue (Chinese knock off?) or your zigbee server what ever that may be. Otherwise check and debug against the blueprint and/or contact the author of that blueprint
Hello,
I was having the same problem. After checking out the blueprint I realized that the "press" action is actually being triggered by the "release" event of zigbee2mqtt. The release event is also triggered when holding the button (and then releasing it).
The "press" event of zigbee2mqtt cannot be used as the press event in the blueprint because it is triggered before the holding event, but it is instead mapped to the "init" event of the switch manager. That because it doesn't matter how you use the button, the "press" event of zigbee2mqtt will always be the first to fire, so it serves as the "init" in switch manager.
The solution I came up with is simple: after the "press" event we just have to check if the last state of the button was "init" for "single press" or something else for "hold", "step forward" or "step backward".
I added a stop condition as the first action to my automation to simplify things.
choose:
- conditions:
- condition: template
value_template: "{{ data.button_last_state[0].title != \"init\" }}"
alias: Not a single press
sequence:
- stop: Not a single press (propably hold)`
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Hi How can I check short and long press with my philips hue smart button ? I would like to use hold action to change random color of my light but when set the automation, it trigger also press button so the light turn off after it.
Tk