Index the entity registry (#37994)
This commit is contained in:
1 parent
41421b56a4
commit
890562e3ae
3 files changed
+43
-22
No files matched your search
@@ -351,6 +351,7 @@ def mock_registry(hass, mock_entries=None):
|
||||
"""Mock the Entity Registry."""
|
||||
registry = entity_registry.EntityRegistry(hass)
|
||||
registry.entities = mock_entries or OrderedDict()
|
||||
registry._rebuild_index()
|
||||
|
||||
hass.data[entity_registry.DATA_REGISTRY] = registry
|
||||
return registry
|
||||
|
||||
Reference in new issue
Block a user