Can speech use friendly name?

Here is an example of an intent script:

SetLightLevel:
  action:
    service: light.turn_on
    target:
      entity_id: "{{ light }}"
    data:
      brightness_pct: "{{ light_level }}"
  speech:
    text: "{{ light}}} set to {{ light_level }} percent."

the custom sentences yaml passes this data:

lists:
  light:
    values:
      - in: "kitchen (light|lights)"
        out: "light.kitchen_lights"
      - in: "dining [room] (light|lights)"
        out: "light.dining_lights"
  light_level:
    values:
      - in: "dimmest"
        out: "25"
      - in: "dim"
        out: "50"
      - in: "bright"
        out: "75"
      - in: "brightest"
        out: "100"

It works fine, but the speech text speaks the entity id (light.dining lights). I want it to speak the friendly name. I can get it to say the area with {{ area_name(light) }}, but {{ friendly_name(light) }} doesn’t work. Is there a way to have speech text use the friendly name of an entity? Thanks

Have run into the same issue - there’s no way to extract a template from a template that I can figure out.

e.g. tried something like:

text: “{{ state_attr(‘{{light_id}}’, ‘friendly_name’) }}”

which is not allowed. Tried setting a variable first

text: “{% set attid = state_attr('{{light_id}}, ‘friendly_name’) %} {{ attid }}”

which is also not allowed. Doesn’t seem possible in the intent or response either

I was incorrect earlier, this is possible:

“Playing {{ audio_request }} on speaker {{ state_attr(speaker_area, ‘friendly_name’) }}”

  speech:
    text: "{{ state_attr(light, 'friendly_name') }} set to {{ light_level }} percent."

This works. Thank you; I don’t think I would have stumbled onto that.