Allow overriding name via entity registry (#12292)

* Allow overriding name via entity registry

* Update requirements
This commit is contained in:
Paulus Schoutsen 2018-02-11 09:16:01 -08:00 committed by GitHub
parent 8b9eab196c
commit 17e5740a0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 91 additions and 21 deletions

View file

@ -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