Dim lights with a namron switch

Hello this is my first post here.
im new to making advaneced flows and im having a really hard time making the flow i want and i was hoping someone could give me some tips or point me in the right dirction.

i have a namron switch with a on and off button where i can chose between: button is held down, released or pressed. i want the button to dim the chosen light up when the on button is pressed and dim down when the off button is pressed, i know i can have it set to a spesific dim level when i push the button but i want it to dim until i let go of the button.

Hope this is understandable and that my english is readible, haha

I was able to help flipmoo with his blinds. He wanted to tap-and-hold and then release the button when the blinds reaches the desired position.

(I don’t have a sunshade so I dim my kitchen lamp as an example. I also only have one button that supports holding and letting go. Where I use ‘Dim level’, you have to use the position of the sunshade)

Suppose the sunshade goes from 0 (%) to 1(100%) in 25 seconds, then it takes from 0.35 (35%) open to 1 (100% ) so (1-0.35)*25 seconds. Instead of 100 steps (1-0.35)*100 steps are needed. I put these values in variable ‘runtime’ and ‘steps’

Each time the transition reaches a step, the transition value is therefore 0.01 higher and the sunshade is opened 1% further.