1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 06:33:51 +00:00

Exclude internal entities from name uniqueness validation (#9410)

This commit is contained in:
J. Nick Koston
2025-07-09 22:34:01 -10:00
committed by GitHub
parent 2be4951ad9
commit 0d94246858
2 changed files with 51 additions and 12 deletions

View File

@@ -187,6 +187,12 @@ def entity_duplicate_validator(platform: str) -> Callable[[ConfigType], ConfigTy
# No name to validate
return config
# Skip validation for internal entities
# Internal entities are not exposed to Home Assistant and don't use the hash-based
# entity state tracking system, so name collisions don't matter for them
if config.get(CONF_INTERNAL, False):
return config
# Get the entity name
entity_name = config[CONF_NAME]