Binary helper cover position

I have a Velux window integrated in HA.
Works perfectly.
On that window is a screen, also integrated.
But the screen may only be operated if the window position is less than 8%

So I need a binary helper that is 1 when the window position is below 8% and 0 when over 8%

How can I accomplish that?