Allow overriding name via entity registry (#12292)
* Allow overriding name via entity registry * Update requirements
This commit is contained in:
1 parent
8b9eab196c
commit
17e5740a0c
11 files changed
+91
-21
No files matched your search
+2
-2
@@ -317,10 +317,10 @@ def mock_component(hass, component):
|
||||
hass.config.components.add(component)
|
||||
|
||||
|
||||
def mock_registry(hass):
|
||||
def mock_registry(hass, mock_entries=None):
|
||||
"""Mock the Entity Registry."""
|
||||
registry = entity_registry.EntityRegistry(hass)
|
||||
registry.entities = {}
|
||||
registry.entities = mock_entries or {}
|
||||
hass.data[entity_platform.DATA_REGISTRY] = registry
|
||||
return registry
|
||||
|
||||
|
||||
Reference in new issue
Block a user