[tests] Fix integration helper to match entities exactly (#14837)

Co-authored-by: J. Nick Koston <nick@home-assistant.io>
This commit is contained in:
Bonne Eggleston
2026-03-15 16:02:23 -07:00
committed by GitHub
parent 15ce4b3616
commit 92d5e7b18c
4 changed files with 24 additions and 24 deletions

View File

@@ -88,7 +88,7 @@ def build_key_to_entity_mapping(
Args:
entities: List of entity info objects from the API
entity_names: List of entity names to search for in object_ids
entity_names: List of entity names to match exactly against object_ids
Returns:
Dictionary mapping entity keys to entity names
@@ -97,7 +97,7 @@ def build_key_to_entity_mapping(
for entity in entities:
obj_id = entity.object_id.lower()
for entity_name in entity_names:
if entity_name in obj_id:
if entity_name == obj_id:
key_to_entity[entity.key] = entity_name
break
return key_to_entity