Move imports to top for wirelesstag (#29198)
This commit is contained in:
parent
0d30a6bcac
commit
66aae61fd5
1 changed files with 6 additions and 5 deletions
|
@ -1,18 +1,20 @@
|
||||||
"""Support for Wireless Sensor Tags."""
|
"""Support for Wireless Sensor Tags."""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from requests.exceptions import HTTPError, ConnectTimeout
|
from requests.exceptions import ConnectTimeout, HTTPError
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
from wirelesstagpy import NotificationConfig as NC
|
||||||
|
|
||||||
|
from homeassistant import util
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
ATTR_BATTERY_LEVEL,
|
ATTR_BATTERY_LEVEL,
|
||||||
ATTR_VOLTAGE,
|
ATTR_VOLTAGE,
|
||||||
CONF_USERNAME,
|
|
||||||
CONF_PASSWORD,
|
CONF_PASSWORD,
|
||||||
|
CONF_USERNAME,
|
||||||
)
|
)
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant import util
|
|
||||||
from homeassistant.helpers.entity import Entity
|
|
||||||
from homeassistant.helpers.dispatcher import dispatcher_send
|
from homeassistant.helpers.dispatcher import dispatcher_send
|
||||||
|
from homeassistant.helpers.entity import Entity
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -96,7 +98,6 @@ class WirelessTagPlatform:
|
||||||
configs.extend(bi_sensor.event.build_notifications(bi_url, mac))
|
configs.extend(bi_sensor.event.build_notifications(bi_url, mac))
|
||||||
|
|
||||||
update_url = self.update_callback_url
|
update_url = self.update_callback_url
|
||||||
from wirelesstagpy import NotificationConfig as NC
|
|
||||||
|
|
||||||
update_config = NC.make_config_for_update_event(update_url, mac)
|
update_config = NC.make_config_for_update_event(update_url, mac)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue