Open Windows turn off A/C

I am trying to control my a%c based in windows being open or closed.

I want to turn off the a/c if any of my windows are open for 5 minutes

I’m not sure how this automation will behave.
Do all windows need to be open? Or does any window need to be open?

I want to to fire if any is open

alias: A/C off Windows Open
description: ''
trigger:
  - platform: state
    entity_id: binary_sensor.master_window_1
    to: 'on'
    for: '00:05:00'
  - platform: state
    entity_id: binary_sensor.kitchen_window
    to: 'on'
    for: '00:05:00'
condition: []
action:
  - service: climate.turn_off
    target:
      device_id: a70395248556c4abf5fba5c9aef774d1
mode: single

Any one of the 2 windows are opened for 5 minutes will perform the action it looks like.

Great… that’s my expected behavior… Thanks

Any idea what the close to turn on automation would look like?
Turn on if ALL windows are closed

I use this

you just need to set the off sensors and the on sensors

I see he added blueprint for it