Allow overriding name via entity registry (#12292)

* Allow overriding name via entity registry

* Update requirements
This commit is contained in:
Paulus Schoutsen committed 2018-02-11 23:38:15 -08:00
1 parent 56b185f7ab
commit bfd9a5a863
11 files changed
+91 -21

No files matched your search

+2 -2
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