I will break it down for you, and you will see it is not too complicated
Clamp(switch.value('openness') - 100 * timedelta, 0, 10000)
I am doing this from memory so hopefully it is close to what I did for you.
Clamp(A,B,C) is a useful event. It takes what you put in as A, and has B as a lower limit and C as an upper limit.
So A is "switch.value('openness') - 100 * timedelta"
Here I am subtracting 100 per second, you can set this as any value at all, but I like to use 100. When you jump on the switch, openness is set to 400, 400-100 per second is going to last 4 seconds. 600 would take 6 seconds etc
B is the lower limit, so the value of 'openness' will never go below 0, and it will stop exactly on 0.
C is the upper limit, which is not a specific value at all, just bigger than 400.