There seem to be 2 requirements here: some way to easily identify when the condition is true or false, and another to block the variable from changing depending on the condition.
If it were me, I think I'd create a
Device Group (one of the Virtual Devices) that contains all the devices (assuming ON means open and OFF means closed) defined as
Any device is ON. Then that group represents the "zone" that you've defined such that it only goes OFF when everything is closed.
Then, assuming you were only changing the variable from a Trigger/Schedule, you would just put a condition on those that the zone device has to be off.
It gets more complicated if you want to change the variable in the script, but only in as much as you'd again check the value of the zone device before setting the variable.
The complicated scenario is if you want to manually change the variable. If you want to do that then you'll have to deal with the change after it's happened either via a trigger or via a plugin that monitors the variable for changes and "fixes" it if the change shouldn't have happened in the first place.
As with most things Indigo, there are other ways of doing it, this is just how I would. This is the approach I took when I
built an alarm system in my Travel Trailer years ago.