Group Specific Friendly Name

My reasoning for this:

Groups Garage and Living Room includes Motion. When in a group titled for a room such as Garage, I want it to read “motion” since I know it is referring to the Garage Motion Sensor. When I create a group combining all motion sensors titled Motion Sensors, I want it to read:

Garage Motion
Living Room Motion
etc…

Use

name: “Garage Motion”

when you setup your group

I’m referring to each entity in a group, I don’t see that in the documentation you linked… Am I missing it?

does assigning the entities themselves friendly names not do it?

I didn’t state this very well, but the goal is to have a different friendly name per group/card. Here is my current setup with hopefully a more clear explanation of what I want and why…

Here, it should read “Motion” since the card is Garage specific and the current Friendly name of “Garage Motion” is redundant.

Here, I want “Garage Motion” because the group/card is general (Motion Sensors) and I need to differentiate each one. If I use friendly name “Motion” each sensor appears the same and I can’t identify each one from the other.

sou you are looking for something like this

group:
  garage:
    view: yes
    entities:
      - motion.garage_motion
        name: motion
      - light.garage_light_switch
        name: light

  motionDetectors:
    view: yes
    entities:
      - motion.garage_motion
        name: garage
      - motion.livingroom_motion
        name: living room

Where name is what would show up on the view. Right? If it’s there it would override the friendly name for the device if there is one. If there isn’t a friendly name for the device, then it would fall back to the name of the device. So the name shown would be as follows.

group entity name
entity friendly name
device name

Right?

2 Likes

You got it.

I have brought this up a couple of times. First time I tacked it on an existing topic, but then I split out into it’s own feature request. Maybe this one will get more traction because I think you explained it better.

Added these for reference:

This is now possible by using Custom UI

Has anybody had any luck getting the context-aware friendly names to work using @andrey’s Custom UI? Whenever I have a go at this and reload Home Assistant, all my group cards are empty. I have no errors in the Home Assistant log and I have no clue what I’m doing wrong.

Here’s my relevant yaml-code:

homeassistant:
  name: Home
  unit_system: metric
  time_zone: !secret HASS_TIME_ZONE
  latitude: !secret HASS_LATITUDE
  longitude: !secret HASS_LONGITUDE
  elevation: !secret HASS_ELEVATION
  customize: !include customize.yaml
  customize_glob:
    "*.*":
      custom_ui_state_card: custom-ui
    sensor.living_area_door_sensor_templated:
      icon: mdi:glassdoor
      friendly_name: "Living area door"
      friendly_names:
        group.living_area: "Door"

I removed any reference to the sensor.living_area_door_sensor_templated entity in my customize.yaml file, to no avail.

I’ve also tried splitting up the code above, so

homeassistant:
  name: Home
  unit_system: metric
  time_zone: !secret HASS_TIME_ZONE
  latitude: !secret HASS_LATITUDE
  longitude: !secret HASS_LONGITUDE
  elevation: !secret HASS_ELEVATION
  customize: !include customize.yaml
  customize_glob:
    "*.*":
      custom_ui_state_card: custom-ui

in configuration.yaml, and

sensor.living_area_door_sensor_templated:
  icon: mdi:glassdoor
  friendly_name: "Living area door"
  friendly_names:
    group.living_area: "Door"

in customize.yaml but that doesn’t change anything either.

Perhaps needless to say, but I followed the usage instructions on the README page on Github. Any help would be much appreciated :slight_smile:

Just to make sure: Did you place state-card-custom-ui.html and state-card-custom-ui.html.gz in ~/.homeassistant/www/custom_ui/ dir?

Yes, I did.

What browser are you using? If not Chrome - could you try non-iphone Chrome?

Try to clear cache for your HA URL.

I tried in Firefox (in which Home Assistant is always opened), as well as Chrome and Safari (which I don’t use for Home Assistant).

I have been using Chrome to test so I can clear the browser cache without losing anything important. I’ve also tried the following things:

  • access the UI both through my nginx reserve proxy (personal domain) and via the ip-address directly
  • commenting out base_url: from the http: section
  • chmodded the relevant files with 777, with the following result:
pi@Ra:/home/hass/.homeassistant/www/custom_ui $ ls -l
-rwxrwxrwx 1 hass hass 46902 May 25 15:08 state-card-custom-ui.html
-rwxrwxrwx 1 hass hass 31480 May 25 15:08 state-card-custom-ui.html.gz
``

Check the Network tab in Chrome/Firefox dev tools. Do you see state-card-custom-ui.html successfully loaded there?
Any errors in dev tools console?

Hmmm the status is (failed)…

I think you downloaded https://github.com/andrey-git/home-assistant-custom-ui/blob/master/state-card-custom-ui.html which is a github page with the file.
Download https://raw.githubusercontent.com/andrey-git/home-assistant-custom-ui/master/state-card-custom-ui.html instead (and also for .gz file)

The sizes should be 10k for unzipped and 3k for zipped.

1 Like

Awesome, it’s working now! Thank you so much for helping me out, @andrey!! :grinning:

takes a walk of shame for his stupid mistake :stuck_out_tongue:

1 Like

I have many sensors and switches (more than 150), and I need two lists.
One list for users, it uses normal user-friendly names.
The second list for me, in it these devices are named by their ‘system’ numbers. This so that I can quickly debug and check connections.

How can I do it? (preferably without additional programs)

And why you need a separate file ‘customize.yaml’ where the names are stored separately. It’s very inconvenient - you have to keep two lists. Why it is impossible to save ‘friendly_name’ together with the object itself and/or in group description?

Groups support name in the group yaml definition. Some sensors/switched also support this (depending on platform).

customize is a generic feature allowing to override those.

Core UI doesn’t support context-specific names, you can use CustomUI for that.