1 button with more functions, help needed

As @s73nm suggested I created a variable ‘long pres is hold’ witch is changed to YES as soon the button is long pressed. Releasing the button changes it back to NO.

As long as the button is hold the flow restarts itself every 1 second.

Theoretically you could dim all the way down 0%. If so a single press will dim the light to 20%. Otherwise it will toggle the light.

Your flow changes the dim direction at 0% and 100%. My flow changes the direction at every button release.