Boolean Algebra with logic yes/no variables

I have a set of variables for my door/windows sensors which are yes or no.
How can i calculate something like (sensor1 or sensor2 or sensor3) to have one resulting variable to reflect if any window is open.
When i try with math expression in better logic i receive errors.
thanks

Have you tried zones?
And what are the variables for?

The variables are for the Status of all door sensors. Zones is Not an Option

That’s how realized it currently. Thanks.
I was just wondering if I could do it via math

Instead of Boolean variables, you can use numerical variables that can also be used for calculations.

Example:
– 12 windows and doors in total
– Numerical variable
– Closed = 0
– Open = 1

If a status of a door/window change from close to open then calculate 1 to the numerical variable. If a status of a door/window change from open to close then subtract 1 from the numerical variable.

Numerical variable = 0 (all doors/windows are closed)
Numerical variable = 1 (one door or window is open, 11 are closed)
Numerical variable = 2 (two doors or windows are open, 10 are closed)
Numerical variable = 12 (all doors and windows are open, none is closed)

1 Like