UniFi - Simplify getting controller from config entry (#26335)

* Simplify getting controller from config entry

* Lint ignore no longer needed

* Fix tests
This commit is contained in:
Robert Svensson authored and GitHub committed 2019-09-01 17:57:25 +02:00
1 parent 5b77a357e6
commit b5426761f4
7 files changed
+38 -33

No files matched your search

+2 -1
View File
@@ -15,6 +15,7 @@ from homeassistant.components import unifi
from homeassistant.components.unifi.const import (
CONF_CONTROLLER,
CONF_SITE_ID,
CONTROLLER_ID as CONF_CONTROLLER_ID,
UNIFI_CONFIG,
)
from homeassistant.helpers import entity_registry
@@ -213,7 +214,7 @@ CONTROLLER_DATA = {
ENTRY_CONFIG = {CONF_CONTROLLER: CONTROLLER_DATA}
CONTROLLER_ID = unifi.CONTROLLER_ID.format(host="mock-host", site="mock-site")
CONTROLLER_ID = CONF_CONTROLLER_ID.format(host="mock-host", site="mock-site")
@pytest.fixture