Move imports to top for nuimo_controller (#29367)
parent
bd1e5fce27
commit
3205afe74e
|
@ -3,10 +3,12 @@ import logging
|
|||
import threading
|
||||
import time
|
||||
|
||||
# pylint: disable=import-error
|
||||
from nuimo import NuimoController, NuimoDiscoveryManager
|
||||
import voluptuous as vol
|
||||
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.const import CONF_MAC, CONF_NAME, EVENT_HOMEASSISTANT_STOP
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -104,8 +106,6 @@ class NuimoThread(threading.Thread):
|
|||
|
||||
def _attach(self):
|
||||
"""Create a Nuimo object from MAC address or discovery."""
|
||||
# pylint: disable=import-error
|
||||
from nuimo import NuimoController, NuimoDiscoveryManager
|
||||
|
||||
if self._nuimo:
|
||||
self._nuimo.disconnect()
|
||||
|
|
Loading…
Reference in New Issue