Automation based on all windows/doors from alarm system

I could manually clone the set of entities from my Abode alarm (connected via homekit) but I’d really rather just use the alarm system as the source of truth. I already use the Auto Entities card for my UI to show what is open

type: custom:auto-entities
card:
  type: entities
  title: Open Doors and Windows
filter:
  include:
    - device_manufacturer: Abode
      device_model: Contact Sensor
      domain: binary_sensor
      state: 'on'

I’d like to automate turning my thermostat to eco if any of the Abode contact sensors are open for more than X time.

I know how to do this with a manually managed group of entities but the Don’t Repeat Yourself in me really hates having a static list of entities that I know I can fetch dynamically.

Is there a way to dynamically create/manage an entity group?