Change the state of a cover

So basically I want that if someone manually opens the window it should change the state of the window cover to open (not trigger the open command) . It will know that its open because I have an endstop when its closed.

I guessing this is a diy, just because covers usually report their positions. There is an endstop cover for this type of setup but it requires both an open and close sensor.