Trying to handle single press and press-and-hold on a button that only gives press and release

I've made this flow to handle the single-press and press-and-hold for a button on my Home Assistant.
The zigbee button only gives press and release.

I was wondering if there were a better way, than using a flow variable? It seems clumsy :slight_smile:

Have a look here which descibes how to make a momentary button, ie like your Press and Hold. It works both with mouse and touchscreens.

I might be wrong but that seems to be a dashboard button, whereas @fribse has a physical button and already gets a "button down" and a "button up" message.

I looked at this earlier but didn't reply because it's Home Assistant related, which might change things.

On the face of it though:
Button down : start motor
Button up: stop motor.

Can you explain why this is not enough?

Agh quite so.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.