Listing all entities exposed to voice

Is there a way of listing all entities that are exposed to voice. I’ve seen this question asked before, but not seen anyone give a definitive answer.

I’m trying to create an LLM instruction for my voice assistant and found this template

{% for entity in exposed_entities -%}
{{ entity.entity_id }},{{ entity.name }},{{ entity.state }},{{entity.aliases | join('/')}}
{% endfor -%}

However, when I try it in the template editor I get

exposed_entities is undefined

So how do I define exposed_entities?