AC shutoff

Nothing bugs me more when the kids open the windows and doors withthe AC on. I would love a device that connected to the existing alarm wiring/window magnets that when left open for more than a specified time, it would turn off the AC. I see this in hotels a lot but not for residential use.

I think you could do that pretty easily with a window air conditioner, a Wyze plug, and one of the Wyze Sense product lines?

I was thinking more like a AC air handler on a central AC unit. Maybe a thermastat controller that does this