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