Fix setup error by moving an import back into the setup function

pull/29908/head
springstan 2019-12-13 10:53:28 +01:00
parent 4d57de335c
commit c741664d4d
1 changed files with 5 additions and 1 deletions
homeassistant/components/homekit

View File

@ -29,7 +29,6 @@ from homeassistant.helpers.entityfilter import FILTER_SCHEMA
from homeassistant.util import get_local_ip
from homeassistant.util.decorator import Registry
from .accessories import HomeBridge, HomeDriver
from .const import (
BRIDGE_NAME,
CONF_ADVERTISE_IP,
@ -303,6 +302,11 @@ class HomeKit:
def setup(self):
"""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)