2024.4 added labels.
Currently labels for entities & automations can be assigned in UI only.
Suggest to add possibility to define & assign labels in yaml.
Defining labels should be possible in different yaml files (splitting config).
Labels defined in yaml & labels defined in UI must be merged.
Labels must be unique.
Entity of any type (i.e. sensors, automations etc) should be allowed to have a label (labels) assigned (out of defined labels) - for instance by using “customize” / “customize_glob”.
My first thought upon reading the release notes. Currently maintaining a bunch of sensors to do with solar inverters and having to prefix the sensor names according to the brand of device, being able to add a ‘label: huawei (or fronius etc)’ in the yaml template/sensor would be so much better.
Entity of any type (i.e. sensors, automations etc) should be allowed to have a label (labels) assigned (out of defined labels) - for instance by using “customize” / “customize_glob”.
As someone who prefers doing it the hard way (HA Core, as much of the configuration in YAML as possible) I second this reques wholehartedly.
Please allow us to define Floors, Labels and Categories in YAML files and assign them in YAML files as well (preferably this will include Locations)
With regards to point 4 in the original post: Why not add a floors/labels/categories attribute that accepts a list of floors/labels/categories? (and preferably locations as well…)
I’d love to replace some or all of my groups with labels, but for that to be feasible it really would be necessary to have a way (service) to dynamically assign/remove entities to/from labels - like you can with groups …
The new labels are really great, no doubt. Big applause.
I think a label is by definition a property of an item (automation, entity, whatever…).
But when having a lot of configurations in YAML I now have to define some/most of the properties in YAML but others in UI.
Neither looking at the YAML code nor looking in the UI gives me the whole picture.
Personally I would like to define labels in YAML too, just to keep everything together.
not that I would have anything against the FR, but we can add labels on yaml defined automations? (as OP states btw)
All of my automations are yaml too, no issue adding UI labels
That would be the best: experiment in the UI, see the changes in YAML.
I don’t want YAML just for the sake of typing “code” instead of clicking – I like YAML (one of the reasons) as it is a simple text file format that I can track with version control system (git). Not possible with GUI.
Yeah, this is really needed. I have lots of yaml defined automations without a unique id, provided by a hacs integration, and after assigning labels to all automations these have to all be excluded. Makes it not very useful if I can’t completely label all of them.
Adding ids to automations is not same as migrating automations from yaml to UI.
(unrelated to the topic) I would suggest you to add ids to automations. This will give you a possibility to see traces, might be useful for debugging. Do not migrate automation to UI, this is for traces only.
And you will be able to add a label then - for testing at least.
I have not added any labels yet since still using my own “labels” (kept as attributes). Will probably add labels when a corr. support will be added for yaml.
For me, I’d prefer the ability to define labels in YAML.
I have unique IDs for all of them for the sole purpose of traces.
I don’t want to migrate my automations, since I’ll lose comments (vital, and no, I’m not hacking it via descriptions) and I’ll lose my organisation via packages.
I seem to be in the exact situation as you are with my Yaml config. All packages, important comments and links to elsewhere, nicely in Yaml, which we can find blindfolded). All automations and scripts in yaml.
Given the current automation editor, my thoughts on my yaml config for those integrations won’t change in the near future.
And yet, there is no reason for me to want to configure labels in Yaml. Especially since you have unique_id’s you can edit everything in the UI including the new labels.
Because with that you get the ultimate ease of being able to edit/change a label, and it being applied everywhere automatically by the system. (you will change them a lot, so having this automated is a huge asset)
If you’d set labels in yaml and add them per entity, you would have to edit the label itself, and all occurrences of that particular label yourself, which ultimately is rather error prone (talking to myself here… )
I might’ve misunderstood something about labels (and categories) then: It seemed like when a label or category gets added, the automation needs to be migrated. Is that not the case?