Flow for turning off heating source if window is open

I’m new to advanced flow, and I’m trying to figure out a simple way to turn off the heat if a window is open.

My HeatIt thermostats for floor heating have a “on” or “off” card, and I have Aqara door/window sensors on the windows.

I’d like to have a generic flow that can handle all these situations rather than having one for each thermostat and window.

If a window has been left open for more than 3 minutes - turn the heat off until it’s closed again.

But there doesn’t seem to be an easy way to handle this? I could go without the timer, but still it doesn’t seem to have a generic sensor and “on/off” device I can control with labels?

Am I wrong?

Hi @DIYglenn ,
I am not sure, if I understand you right.
For many sensors there is a If… card IsOpen for xxx minutes as well as IsClosed or similar and for the heating system there should be some cards to switch them on and off or to change temperature.

With simple cards you must write one Flow for WindowOpen and one for WindowClosed, If you have several windows in the same room you may use cards on the zone where you put the devices. I do not have those sensors so I do not know how exactly they look like.

But if you want a simple flow that works in all rooms, like If… something happens on a device Then… switch on/off heating in the room, where the device is, I do not have a clue if it works with simple ore advanced flows. Probably you have to try Scripts which I did not yet.

I’ll take a closer look on what the cards can do.
The sensor is basically a contact alarm. So it’s active when the window is open.
If advanced flows are using more resources than simple ones, I can of course just use a normal flow, but that would mean a WindowOpen and WindowClosed for each room. This does of course work, but I was hoping there was an easy way to use labels for rooms;
“If window in room 1 is open for more than 1 minute, turn off heating in room 1

Device capabilities app:
Screenshot from 2024-01-12 16-38-21