Group Specific Friendly Name

I looked at the sources of CustomUI - this is the JS add-on above HTML templates.
CustomUI has no connection with REST API (https://home-assistant.io/developers/rest_api/). And not change real ‘friendly_name’ variable in core.
Correct me if I’m wrong.

IMHO CustomUI this is a bad way.

Also for ‘gui name’ in group used identifier ‘name’, but ‘customize’ section for ‘gui name’ used identifier ‘friendly_name’ and identifier ‘name’ used for core. This creates confusion. I think for ‘gui name’ should use identifier a ‘caption’.

I, for one, am very happy to have Custom UI. Just because it doesn’t work for what you’re trying to do, doesn’t make it something bad. Besides, nobody is forcing you to use it. But hey, just my 2 cents…

This is a bad way because, instead of solving an architectural problem, we are creating a second architectural problem. I’m talking about renaming the caption objects.

As an instrumet to create a more specific Web GUI, this library (CustomUI) is very good.

The whole concept of names (as opposed to IDs) is for the sake of UI. For the REST API you don’t need names.

The name attribute in group, and in other platforms is used for two things:

  1. The value of friendly_name attribute which is then used by the UI.
  2. To create the entity id by slugifying (removing special characters and turning spaces into underscores)

Note that for some don’t have the name config option as the entity id autodetected. (For example Sonos, Z-Wave, etc.)
Those entities don’t have a config entry at all, so they have nowhere to place the name/caption/whatever attribute.

Besides the official UI there HAdahsboard, iOS app, Android app (in the making)

There is Floorplan that allows you to create your own UI using SVG (didn’t try it)
And there is my CustomUI that extends the official UI.

I would assume that if some CustomUI feature is used by many people than it might make it into the official UI.

What I thought you was looking for is to create a group/view consisting of friendly names.
If you are using AppDaemon or are making some kind of client/UI of your own, you could still use the friendly_name by setting them in customize or maintain your own mapping.

You are wrong.
REST API use “friendly_name” - see REST API | Home Assistant Developer Docs.
This is necessary for GUI applications (not web applications!) - such as https://play.google.com/store/apps/details?id=com.axzae.homeassistant.
And therefore the introduction of names through the “Custom UI” plugin is a bad solution that only works in the web GUI (“frontend”) but is not compatible with other GUI applications.

So even if the core UI supported context aware names it wouldn’t help with the app. What backend feature are you requesting?

Group Specific Friendly Name.
With support at the kernel level. And that the REST API request returns the correct names depending on the group.
Of course, for this, we need to add the concept of groups to the REST API.
I understand that this is a great work to improve the core. I just draw your attention to the existing problem, it is necessary to include it in the plan (Milestone). Because this work will have to be done sooner or later.

(and uniformity of identificators is required.)

I too would like to see this added into core but for the time being I have simply implemented a system of clones

Sensor:
  Platform: template
  Sensors:
    Clone__sensor__kitchen_temperature:
      Name: "A different name for the kitchen group"
      Value_template: {{ states.sensor.kitchen_temperature.value }}

I’m sure you get the idea. At the minute I’m trying to keep another library like custom_ui out of my system although I have to say that I haven’t looked at yet.

This is how possible with custom uiby @andrey

I also made clones. 180 clones … army of clones!

1 Like

I’ve only been working with HA for ~1 week and just a couple of days with CustomUI forgive me if I’m asking an obvious question or have done something wrong.

I have a card created from a group and one of the entities in the group I want to have a name displayed rather than the name of the entity.

Here’s what’s in my configuration.yaml:

  customize_glob:
    light.*:
      custom_ui_state_card: state-card-custom-ui
      state_card_mode: break-slider
      stretch_slider: true
      hide_control: false
      theme: happy
      slider_theme:
        min: 10
        max: 100
        pin: true
        off_when_min: false
        report_when_not_changed: false
#    cover.*:
#      custom_ui_state_card: state-card-custom-ui
  # Customization file
  customize: !include customize.yaml

#frontend:
#  extra_html_url:
#    - https://raw.githubusercontent.com/andrey-git/home-assistant-custom-ui/master/state-card-custom-ui.html
#  extra_html_url_es5:
#    - https://raw.githubusercontent.com/andrey-git/home-assistant-custom-ui/master/state-card-custom-ui-es5.html

customizer:
  custom_ui: local
# Show links to resources in log and frontend
#introduction:

and then in my groups.yaml file I have:

Garage Stuff:
  view: yes
  entities:
    - group.garage_afs
    - input_select.afs_speed
      name: Pick Jet AFS Speed
    - sensor.garage_temperature
    - switch.garage_vacuum
    - switch.st_garage_vacuum
    - group.garage_vacuum
    - camera.garage

which currently throws an error when I check the config (everything checked OK before adding name: Pick Jet AFS SPEED)

How would I go about getting the default “Input Select” changed to display what I want? Here’s what it looks like now.

The way you’re trying to set a name, is invalid. What you’re trying to achieve also does not require Custom UI.

What you need to do is put input_select.afs_speed into a group of its own, and then include that new group as an entity of your view. You can give that group a name which will show up where it currently says “Input select”.

Thanks, looking back the thread I was referencing I see it was a feature request. I’ve also just started looking into Custom UI so I thought I would mention it in case it was related to this.

Good damn. I thought this was a real feature too. I really wish they would add this feature.

1 Like