Skip to content

Add configuration option to prepend area name to entity name #244

@loopj

Description

@loopj

Describe the problem

There seem to be two main object naming strategies in Design Center, namely:

  1. Full, descriptive names, e.g. "Living Room Cans"
  2. Short names, relying on the enclosing area to provide context, e.g. "Cans"

Home Assistant entities are currently created by taking the literal name directly from the Vantage object, meaning if your Vantage objects naming takes the latter approach, it is highly likely you will end up with many "duplicate" entity names. Eg. lights.cans and Home Assistant will append numbers to the end to keep them unique, eg light.cans_1, light.cans_2, etc.

When writing scripts or creating automations, these entity names can be annoying!

Describe the solution you'd like

Given these two divergent naming strategies, I propose adding a configuration option in the Config Flow, something like Include area name in entity name.

Enabling this option would generate the entity name light.living_room_cans for a Vantage object named "Cans" in an area named "Living Room".

Keeping this option disabled would continue to use the original object name.

For illustration purposes:

Vantage Area Vantage Object Name HA Entity Name (Option Disabled) HA Entity Name (Optional Enabled)
Living Room Cans light.cans light.living_room_cans
Living Room Lamps light.lamps light.living_room_lamps
Living Room Living Room Cans light.living_room_cans light.living_room_living_room_cans
Living Room Living Room Lamps light.living_room_lamps light.living_room_living_room_lamps
Bedroom Chandelier light.chandelier light.bedroom_chandelier
Bedroom Bedroom Chandelier light.bedroom_chandlier light.bedroom_bedroom_chandlier

There are "clever" approaches we could use, like detecting if the area name is already present in the object name, and prepending the area name if it is not, but these "clever" approaches always seem to be a recipe for disaster.

Additional context

No response

Checklist

  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate of previous feature requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions