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?
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:
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
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 thehttp:
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?
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.
Awesome, it’s working now! Thank you so much for helping me out, @andrey!!
takes a walk of shame for his stupid mistake
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.
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…