In the web app you can set here the variable to 1

It depends on the type of curtains if you get a feedback if it is at the end closed or the end open.
If you get the feedback you could say that if the cutain is totay closed it sets the variable to X, and X is the variable that is used to open the curtains.
And also the other way around. So totaly open, set variable to X, and X is the variable what is used to close the curtains.