Allow overriding name via entity registry (#12292)
* Allow overriding name via entity registry * Update requirements
This commit is contained in:
parent
8b9eab196c
commit
17e5740a0c
11 changed files with 91 additions and 21 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue