Template to return a list of entities

Heya! I need a list of entities for ZHA integration.
I used

{{ integration_entities('zha') }}

but this returns only entity id’s - how can I have id and friendly name in format:

entity_id1, friendly_name1
entity_id2, friendly_name2

entity_id10, friendly_name10

Something like this?

{% for entity in integration_entities('zha') -%}
  {{ entity }}, {{ state_attr(entity, 'friendly_name') }}
{% endfor %}
1 Like

omg! this is what I needed! Thank you!