Better Thermostat control for vacation rental

I am controlling my thermostat mode via door/window sensors and have it shut off after it detects any door/window left open for longer than 3 minutes. It works perfect but… Here the dilemma. If my vacation renters manually turn the thermostat back on without closing doors/windows, the HVAC runs without recognizing that there are still open doors/windows.
Has anybody attempted to create an App that controls the following:
Event >Thermostat is turned to cool/heat/auto > check for open doors/windows > false = do nothing > true = turn thermostat off
I am looking forward to hearing any suggestions or from somebody working on a similar solution.
Thank you