Advanced Labels

Home Assistant now has many ways to group entities: areas, labels, categories, floors, groups, etc. They are really nice and a substantial improvement compared to the past.

Unfortunately all of them still require a lot of manual assignments and lack any support for more advanced use cases.

This can be quite problematic. For example when I want to have a desk area, that is a part of an office area, there is currently no native support for such an abstraction, as areas cannot be nested.

So I decided to make a custom component, that would enable support for such advanced scenarios by utilising labels. Labels are the most flexible of the currently available Home Assistant groupings, so they are a natural fit for this purpose.

To implement it I had to write quite hacky code, but it does work for me for some time now.

Here is the gist of what’s possible:

labels:
  desk_area:
    parents:
      - office_area
  office_area:
    parents:
      - first_floor
      - work_spaces
6 Likes

Version 0.3

Add support for Home Assistant Assist

Now it is possible to use voice to control devices in nested areas.

This is really nice, and it shows that it could have been done this way instead of having the much more inflexible areas.

I really hope someone at Nabu casa takes a closer look at this, because this is really how it should work.

If user have a hard time understanding it then well just keep areas as hey are today but under the hood they would just be labels instead.

Version 0.7: Dynamic label rules

It is now possible to assign a label to an entity, only if it already has some combination of other labels. For example:

upstairs_bedrooms: label("upstairs") and label("bedrooms")