SOLVED
Putting together all of the above – thanks to both @Didgeridrew and @CentralCommand – I think the clearest correct solution is as follows:
For doors or windows opened
The entities list is a list of binary sensors of the device class 'opening', which yield 'on' for 'open' and 'off' for closed.
The requirement is that if any one device shows 'on' (open) then the condition is true and the heating is turned off. If all sensors are off, or unavailable, or there are no sensors (empty list) then the automation acts as if all doors and windows are closed.
{{ entities_list | select ('is_state', 'on') | list | count > 0 }}
For room unoccupancy
The entities list is a list of binary sensors of device class 'occupancy', which yield 'on' for 'detected' (occupied) or 'off' for 'clear' (unoccupied).
The requirement is that the room is regarded as occupied if any one working sensor is on, or there are none (empty list). Sensors that are 'unknown' or 'unavailable' are ignored, so that the room is regarded as occupied by default. I want true for unoccupied, so the NOT occupied determines that the heating will be turned off.
{{ not entities_list | reject ('is_state', [ 'unknown', 'unavailable' ] ) select ('is_state', 'on') | list | count > 0 }}
I had trouble testing the unknown and unavailable conditions with a dummy test sensor operated by a dropdown input_select list, but I will solve that problem another day.
I tested the template with lists containing various combinations of real unavailable entities and dummy test entities it worked correctly in the HA template editor.
{% set entities_list = ["binary_sensor.xxx", "binary_sensor.yyy", "binary_sensor.xzzz"] %}
The next step is to try it in the Blueprint. I hope the entity lists there wok in the same way as my test lists!
Thanks!
