mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Move imports to top for keenetic-ndms2 (#29400)
This commit is contained in:
parent
a24e7832b5
commit
45c7c7a439
@ -1,15 +1,16 @@
|
|||||||
"""Support for Zyxel Keenetic NDMS2 based routers."""
|
"""Support for Zyxel Keenetic NDMS2 based routers."""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from ndms2_client import Client, ConnectionException, TelnetConnection
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
import homeassistant.helpers.config_validation as cv
|
|
||||||
from homeassistant.components.device_tracker import (
|
from homeassistant.components.device_tracker import (
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
DeviceScanner,
|
DeviceScanner,
|
||||||
)
|
)
|
||||||
from homeassistant.const import CONF_HOST, CONF_PORT, CONF_PASSWORD, CONF_USERNAME
|
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PORT, CONF_USERNAME
|
||||||
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -45,7 +46,6 @@ class KeeneticNDMS2DeviceScanner(DeviceScanner):
|
|||||||
|
|
||||||
def __init__(self, config):
|
def __init__(self, config):
|
||||||
"""Initialize the scanner."""
|
"""Initialize the scanner."""
|
||||||
from ndms2_client import Client, TelnetConnection
|
|
||||||
|
|
||||||
self.last_results = []
|
self.last_results = []
|
||||||
|
|
||||||
@ -88,8 +88,6 @@ class KeeneticNDMS2DeviceScanner(DeviceScanner):
|
|||||||
"""Get ARP from keenetic router."""
|
"""Get ARP from keenetic router."""
|
||||||
_LOGGER.debug("Fetching devices from router...")
|
_LOGGER.debug("Fetching devices from router...")
|
||||||
|
|
||||||
from ndms2_client import ConnectionException
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.last_results = [
|
self.last_results = [
|
||||||
dev
|
dev
|
||||||
|
Loading…
x
Reference in New Issue
Block a user