How to get the state of a automatic group?

I have a card that populates its contents based on the condition of an entity being

  • a light
  • part of an area

The card also provides a new entity (Centre in the image above, pointed to by an arrow).

This entity has the interesting feature of being on when any entirety of the card is on, and similarly for the off state.

Is there a way to query this status from an automation or does it exist only in the frontend? I did not find a corresponding entity.

It only exists in the frontend.

It only provides a control on the card and not an actual entity.

You can just do things like this for areas in the backend:

- service: light.toggle
  target:
    area:
      - Centre

HA is smart enough to only act on the lights in that area (and not switches for example) because it knows what domain the service is for.

I tried that but the behaviour is different from the card switch: it toggles each light individually and not as a group.

I resolved the problem some time ago by writing a script that counts the lights on and off and makes a decision to switch on our of all the entities - but was wondering if there is a simpler way.