The logic group determines the window position via two contacts. This makes it easy to realise the window position via two simple contacts.
In addition, there is a sabotage contact.
This input immediately outputs the value "3" to the output if the tamper input triggers with the value "1". Changes to the two window contact inputs are ignored until the tamper contact is set to "0" again.
Here are the states for the three window positions:
Window is closed:
* Contact bottom -> 0 and top -> 0
Window is tilted:
* Contact bottom -> 0 and top -> 1
Window is open:
* Contact bottom -> 1 and top -> 1
The contacts send a one when they are open.