Allow use of Templates when customizing an entity

This year I bought some devices that I was planning on using for christmas decorations, as well as other decorations throughout the year. I was hoping that there was a way to create the friendly name using a template (like if my is_christmas_time boolean was on, change a switch to be named “Tree Lights”) as well as a template for the icon.
Allowing this functionality would be super useful for people that use smart devices for holiday decorations and then change them to be part of their normal decorations, plus if will help with the UAT if the UI can accurately display what it is actually controlling (especially in an auto-entities card)

Looks like someone did do some work on just switches, but I’m not sure if these changes will still work (since it was done over a year ago) Friendly_name_template for switches

The guy never made a PR :man_facepalming:

Anyways, you can probably steal the code from the template sensor’s friendly name template field and put up a PR pretty quickly against template switches.

it’s just that Paulus is heavily opposed to these friendly_name_templates, so this will never make it…

1 Like

User Acceptance Testing

Hmm, probably because it can be done in lovelace.

My apologies. Edited

1 Like

Unless you are using auto-entities

Has he given a reason why?

what if your user is only your wife?

1 Like

no because he feels the name and state field should be used for, well, name and state, and creating a friendly_name_template would be as if we used the name field for state…
Personally I dont agree, and even it it were the case, Id say let the user decide (just as with the regular template https://www.home-assistant.io/integrations/template/#friendly_name_template) but Paulus thumbed it down.
see: Friendly_name_template for Binary_sensors
and https://github.com/home-assistant/architecture/issues/390

1 Like

So am I missing something here? Isn’t friendly_name a front end thing? It’s not the entity_id or anything. His comment “The motivation of this issue is to have the frontend represent data differently.”, yes that is true… because that is what friendly_name is for, is it not?