2024.4: Organize all the things!

I am using it, and it is working properly.

1 Like

I have nothing against this way.
BTW, some people give human names for a furniture, carpets, not to mention cars. So, we can create a ā€œpersonā€ entity for a lovely carpet with a virtual ā€œdevice_trackerā€ which is always ā€œhomeā€, so warmingā€¦
But I think that ā€œlabelsā€ are much more than just a ā€œlocationā€ - so it should be reflected in the menu.

I donā€™t see why you donā€™t get this.
the id is used as unique_id now, and is not comparable to the entity_id of an entity for example. (which is not tied to the entity_id. change the entity_id, the unique_id remains the same. we can not do that with the Floor/Area/Label without running into trouble with our templates)

I dont want anything to be a problem, just trying to explain the experience we now get when we have second thoughts about a Floor/Area/Label name (and want to use those in our templates)

As it stands, the only real solution is to create a new Floor/Area/Label, move what you had before to the new, and delete the old.

3 Likes

Is there a reason why my Home Assistant VM since an update to the latest version (2024.4.0) suddenly started to ask my DNS for all PTR (local network) records?


Blue color is Home Assistant and they consist mostly of PTR records.

What trouble?

Just to say thank you to the Frontend team for fixing the button colors here

of not being able to use the new/changed name in the templates, see 2024.4: Organize all the things! - #120 by Mariusthvdb

1 Like

ā€¦

label_name(label_id)

exactly like area and device.

Show me a template and Iā€™ll show you what you should do.

precisely.

thats what I did in that linked post.

had a label originally names Alarm, then reconsidered and renamed to Alarm spelers.

the templates still required alarm, and alarm_players was not recognized.
dont need to repeat all of that post but that would be the bottom line:

once a name is chosen, it is used as id for that label ( and area/floor) for ever

my suggestion would be to decouple those, and have the templates follow the name, not the unique_id (which would need to be added to the architecture)

4 Likes

True , now i can dump/replace many of my ā€œold type groupsā€ in config.yaml, with Labels ( I hope ) , Wired-Devices / Cameras etc.

Marius, you used slugify, not label_id or label_name. Canā€™t help it if youā€™re using the wrong templates.

Understand that I havenā€™t assigned labels yet to entities, but if you have, this will show you what you can do.

1 Like

no? I never used that in the templates.

just change one of the names of those labels, and see what happens with these templates

Hereā€™s an example pulling the friendly label name

{{ labels() }}
{{ labels() | map('label_name') | list }}
{{ label_id('Great Room') }}
{{ label_areas(label_id('Great Room')) }}

yes I know that, but that is not my issue at allā€¦

As I try to bring across, the issue arises when you change the name of an existing label

Thatā€™s not the ā€˜gotchaā€™ you think it is.

Again, treat it like an ID. If you want to use the friendly name, get the id with label_id.

Thereā€™s no issues if you use label_id.

1 Like

label_id() might be closest to what we are used to see as unique_id on entities probably yes.
My main point however remains, and that is that we need to refer to that, and not to the name, which is way more humane friendly.
Besides that, it also is much easier to rememberā€¦ :wink:

I recall Frenck saying something like the above (need to find the link), and it had been discussed, not finalized yet. Hope it can be improved upon

You donā€™t need to refer to thatā€¦ thatā€™s what you arenā€™t understanding.

If you want to compare to the friendly name, map the label_ids that come from the functions to the label_names. Then do your comparisons to your friendly names or vise versa.

You can literally do that everywhere. Itā€™s no different than using slugify.

1 Like

After upgrading to 2024.4 I am seeing an error when I open the Map page:

Error loading the dashboard strategy:
Error: unknown strategy

image

Any idea what caused this?

2 Likes

I love the ā€œlabelsā€!!!

Would be great to get the option to add labels in every integration you create yourself. For example sensors, switches, etcā€¦ also with automations. Only what to add:

label: name of the label or labels

label: "system, switches"

Do you mean ā€œadd labels in yamlā€?

better:

label: ['system','switches']

or

label:
  - system
  - switches
4 Likes