Set an entities name using a template

Ok so this might seem a bit crazy, but I would like to set the name, or friendly_name of an entity using a template, so something like this.

media_player:

  • platform: universal
    unique_id: “Toshiba 48 Tv”
    name: {{area_name(‘media_player.toshiba_48_tv’)}} “TV”

The resulting name would be: Girls Room TV.

Please don’t go mental at me! I just want to know if its possible. If not I know I can just name things manually.

It is not possible.

See https://www.home-assistant.io/integrations/universal/

In particular:

Screenshot 2023-01-10 at 11-34-44 Universal Media Player

1 Like

Yup, that’s understandable.
Welp, I’m off to rename a whole bunch of scripts and entities because some rooms in our house have changed purpose! fun fun fun!

2 Likes

Templates pretty much only work in the service:, target: and data: fields of scripts and automations (and a couple of dashboard cards like the markdown card). If they can be used in integration configuration options then it will be explicitly stated like this:

Screenshot 2023-01-10 at 12-23-26 Template

1 Like