Thermostat Rule

Maybe create a standalone rule that monitors all windows and tie that to a master open/close device. Then, your rule here just has to bang against that master open/close. I think someone here, maybe @Cobra , actually built an App for window sensor monitoring. You may be able to integrate that into your design somehow.
It is called Check Open Contacts
http://hubitat.uk/