Command friendly name not working
Specs
Version:
2023.11.1-ubeta
The friendly name of commands is copied from the actual name always, therefore it is not modifiable.
Steps to reproduce
1. Create new command(afaik any type is broken) and give it a friendly name that is different to the actual name
2. Store the command and reopen it
3. The friendly name has been changed to the actual name
Images before & after storing43 Replies
reproduced on 2.0.0, gimme a sec
so yeah...
now I need to know when I broke it
ok, the same is with last version edited by Sam, wonder how come
GitHub
MQTT Discovery: friendly_name of json_attributes_topic is ignored (...
The problem In case of a mqtt discovery the friendly_name of a json_attributes_topic does not get picked up correctly (at least for a binary_sensor; I did not check other domains, but this will be ...
now I'm sad
damnnit I'll need to rething 2023.8 mqtt fix to fix the friendly name
as the friendly name is now basically forced
so yeah
basically friendly names are no more
kinda
and I've found bug in HA, changing entity name updates it internally but not within the "device UI"
after HA restart it updates properly
Interesting, Ive added it to JIRA and I'll see what I can find
this is going to give me some headaches
I've "fixed" it already but the fix is jank
and if I make it a proper fix
Is it a client side problem?
I'll need to spend "some" time getting the config migration sorted since "name" is going to become "entityName" and "friendlyName" is going to become "name"
yesn't, since the 2023.8 there is practically no way to "set" friendly_name
it always applies this logic
Yeah just looked into that, but annoying
Would the "name" just be in the list view on client side?
no, the "name" would be the display name
so entity would appear as "DEVICE <name>"
this is the current state with the "jank fix"
as I say "jank" because in code this change is reflected but in the saved sensors.json file:
it still uses name for entityName and friendlyName for name
Wait but where is the name then? In a different view?
what do you mean view?
Like where do you see cpuload
cpuload (the "entityName") is used to generate the object_id which then is used by HA to create entity name
previously it was done with "name"
but the "name" attribute in discovery config will overwrite everything due to 2023.8 mqtt changes
Oh I see, but does that mean nowhere in the front-end it says "cpuload"?
front end HA or HASS.Agent?
the answer is yes in both cases but for which you're asking
Well really both, so "cpuload" is more of a backend descriptor or something?
I'm just trying to workout why we don't just completely remove the friendly name field and go with one single name that is duplicated?
"friendly_name" as a payload attribute is gone with "the fix"
as it does nothing
HA just ignores it
So are we going to get rid of the friendly name input box?
but using only one "label" for the sensor command will mean you cannot have sensor.cpuload in as the entity name and "SomePC CPU Load" as the HA UI friendly name, it would be "SomePC cpuload"
we need 2 labels, one with which user will be able to specift how entity (sensor.somethinh) will be named and the second where they'll specify how the sensor is displayed for example on dashboard
Ah, that's what I was asking, okay makes sense now, that's exactly what I wanted š so basically the name is the ID and the friendly name is the entity name?
currently yes
And is that changing?
good question
depending on how I'll decide to approach the "jankyness" of the fix
Oh okay, I get it now
and how I'll make it compatible with previous config
and it was supposed to be an easy fix š
Don't š I mean if we have to then we create a script. That's what 2.0.0 means, there's gonna be difficulties upgrading. It's much more worth having features(especially one like a name š) over ease of upgrade
true dat
so yeah, I think the best(questionable.net) approach is to make hass.agent aware of various config "versions" and allow it to migrate from older to newer
not that I won't rewrite it with v3 and new UI
but that's "some day, over the rainbow"
š
not fully decided tho, there is also a half-jank way
Well is there one script/file that runs to important changes, could you add a version number to the config file? Or its probably already there so then just check for it and run one of the 2 scripts depending on what version the previous config is. That way it's compatible with future version changes to the config system?
Another option would just be to run a different script depending on the directory, because the old app is stored somewhere different to the new one right?
the half-jank looks good
config will stay the same
but it will be parsed correctly by json library
And this pr will bring a lot of internal changes overall in terms of naming, I need to verify this but I think the friendly name for satellite entities never worked (or I borked it somewhere down the line :d)
nice, got the satellite service "friendly names" to work
yeah, I did it
mostly
need to add some logic but the models are there
Nice one, just much better in terms of UX
god damnnit
I think I've finally finished all migration/name compatibility code
So in v2 the friendly name paramater will work right? As in if i set it to
Gpu Temp
It will show in HA as
yeah