Skip to content

Commit

Permalink
Move imports into setup function in homekit __init__.py (#30137)
Browse files Browse the repository at this point in the history
  • Loading branch information
springstan authored and balloob committed Dec 22, 2019
1 parent 9c23c4a commit 2518088
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion homeassistant/components/homekit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
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,
Expand Down Expand Up @@ -303,6 +302,8 @@ def __init__(

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)

Expand Down

0 comments on commit 2518088

Please sign in to comment.