Using arrays in Automations

That is addressed in my post from the thread linked above. The most critical part for the linked example is that your window sensors (or sensor groups) and climate entities share the same Area designation. Instead of creating a single group containing all your window sensors I would create a group for each Area (you could then combine those into an “all” group for other uses if you want).

alias: Test of All Windows Open Detection
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.group_bedroom1_open_windows
      - binary_sensor.group_bedroom2_open_windows
      - binary_sensor.group_kitchen_open_windows
      - binary_sensor.group_livingroom_open_windows
    to: "on"
    from: "off"
    for:
      seconds: 30
condition: []
action:
  - variables:
      area: "{{ area_name(trigger.entity_id) }}"
      targets: >
        {{ expand(area_entities(area))
        | selectattr('domain','eq','climate')
        | map(attribute='entity_id') | join  }}
  - service: climate.set_hvac_mode
    data:
      hvac_mode: "off"
    target:
      entity_id: "{{ targets }}"
mode: single

There are times when this might not be an appropriate method. It may not work for you if your Areas in HA do not match well with the layout of your climate system. For example, if you have a more open layout where the climate entities of multiple Areas need to be linked to multiple window groups. There are other methods of linking your climate entities to specific windows or window groups if this one doesn’t work for you.