mirror of
https://github.com/home-assistant/core.git
synced 2025-08-11 16:45:19 +02:00
Fix setup error by moving an import back into the setup function
This commit is contained in:
@@ -29,7 +29,6 @@ from homeassistant.helpers.entityfilter import FILTER_SCHEMA
|
|||||||
from homeassistant.util import get_local_ip
|
from homeassistant.util import get_local_ip
|
||||||
from homeassistant.util.decorator import Registry
|
from homeassistant.util.decorator import Registry
|
||||||
|
|
||||||
from .accessories import HomeBridge, HomeDriver
|
|
||||||
from .const import (
|
from .const import (
|
||||||
BRIDGE_NAME,
|
BRIDGE_NAME,
|
||||||
CONF_ADVERTISE_IP,
|
CONF_ADVERTISE_IP,
|
||||||
@@ -303,6 +302,11 @@ class HomeKit:
|
|||||||
|
|
||||||
def setup(self):
|
def setup(self):
|
||||||
"""Set up bridge and accessory driver."""
|
"""Set up bridge and accessory driver."""
|
||||||
|
# pylint: disable=import-outside-toplevel
|
||||||
|
from .accessories import (
|
||||||
|
HomeBridge,
|
||||||
|
HomeDriver,
|
||||||
|
)
|
||||||
|
|
||||||
self.hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, self.stop)
|
self.hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, self.stop)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user