Binary Sensor Group Helper: behavior of "All Entities" in "Group Options"

Just to be complete: In case you want to include unavailable group members so they will also result in the group sensor status “ON” in stead off “OFF” you need to create the following template sensor in the UI:

{{ expand('binary_sensor.sunscreen_criteria_group') | selectattr('state', 'in', ['unavailable', 'unknown', 'none', 'on']) | list | count  > 0 }}

Thanks to @123 for her/his original solution, I only added ‘on’ to it.
BTW If you create this template sensor in the UI it is way more flexible (and provide more information) than if done in a file.