Template to return a list of entities

For anyone following at home… the code in the ui that seems to do this is:

(from here: frontend/src/dialogs/more-info/ha-more-info-info.ts at 7e56d5f3513117b14b8bf95c1215123692caacd3 · home-assistant/frontend · GitHub)

        ${stateObj?.attributes.restored && entityRegObj
          ? html`<ha-alert alert-type="warning">
              ${this.hass.localize(
                "ui.dialogs.more_info_control.restored.no_longer_provided",
                {
                  integration: entityRegObj.platform,
                }
              )}
            </ha-alert>`
          : nothing}

And from this thread: Restored Entities Explanation

“Restored” entities are present in your Home Assistant Storage Registry (they have been discovered in the past) but are not currently available/present/discoverable.

So it seems the thing to do is to look at the attributes of the entity, and if it has “restored” there, then it is “not provided” (and can presumably be deleted).

An example of such entity:

        "button.google_assistant_synchronize_devices": {
            "entity_id": "button.google_assistant_synchronize_devices",
            "state": "unavailable",
            "attributes": {
                "restored": true,
                "friendly_name": "Synchronize devices",
                "supported_features": 0
            },
            "context": {
                "id": "01JVBFRMGY354KZT8QRN27RR96",
                "parent_id": null,
                "user_id": null
            },
            "last_changed": "2025-05-16T02:46:22.494Z",
            "last_updated": "2025-05-16T02:46:22.494Z"
        },