Move imports to top for unifi_direct (#29106)
parent
4119ade2af
commit
a27d8570c8
homeassistant/components/unifi_direct
|
@ -1,16 +1,17 @@
|
|||
"""Support for Unifi AP direct access."""
|
||||
import logging
|
||||
import json
|
||||
import logging
|
||||
|
||||
from pexpect import exceptions, pxssh
|
||||
import voluptuous as vol
|
||||
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.components.device_tracker import (
|
||||
DOMAIN,
|
||||
PLATFORM_SCHEMA,
|
||||
DeviceScanner,
|
||||
)
|
||||
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME, CONF_PORT
|
||||
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PORT, CONF_USERNAME
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -74,7 +75,6 @@ class UnifiDeviceScanner(DeviceScanner):
|
|||
|
||||
def _connect(self):
|
||||
"""Connect to the Unifi AP SSH server."""
|
||||
from pexpect import pxssh, exceptions
|
||||
|
||||
self.ssh = pxssh.pxssh()
|
||||
try:
|
||||
|
@ -98,7 +98,6 @@ class UnifiDeviceScanner(DeviceScanner):
|
|||
self.connected = False
|
||||
|
||||
def _get_update(self):
|
||||
from pexpect import pxssh, exceptions
|
||||
|
||||
try:
|
||||
if not self.connected:
|
||||
|
|
Loading…
Reference in New Issue