Sort imports according to PEP8 for device_tracker (#29666)
This commit is contained in:
1 parent
27bd6ca1db
commit
01d651c67d
7 files changed
+34
-33
No files matched your search
@@ -3,21 +3,19 @@ import asyncio
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.loader import bind_hass
|
||||
from homeassistant.components import group
|
||||
from homeassistant.const import ATTR_GPS_ACCURACY, STATE_HOME
|
||||
from homeassistant.helpers import discovery
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.typing import GPSType, ConfigType, HomeAssistantType
|
||||
|
||||
from homeassistant.helpers.event import async_track_utc_time_change
|
||||
from homeassistant.const import ATTR_GPS_ACCURACY, STATE_HOME
|
||||
from homeassistant.helpers.typing import ConfigType, GPSType, HomeAssistantType
|
||||
from homeassistant.loader import bind_hass
|
||||
|
||||
from . import legacy, setup
|
||||
from .config_entry import ( # noqa: F401 pylint: disable=unused-import
|
||||
async_setup_entry,
|
||||
async_unload_entry,
|
||||
)
|
||||
from .legacy import DeviceScanner # noqa: F401 pylint: disable=unused-import
|
||||
from .const import (
|
||||
ATTR_ATTRIBUTES,
|
||||
ATTR_BATTERY,
|
||||
@@ -38,11 +36,12 @@ from .const import (
|
||||
DEFAULT_TRACK_NEW,
|
||||
DOMAIN,
|
||||
PLATFORM_TYPE_LEGACY,
|
||||
SOURCE_TYPE_BLUETOOTH_LE,
|
||||
SOURCE_TYPE_BLUETOOTH,
|
||||
SOURCE_TYPE_BLUETOOTH_LE,
|
||||
SOURCE_TYPE_GPS,
|
||||
SOURCE_TYPE_ROUTER,
|
||||
)
|
||||
from .legacy import DeviceScanner # noqa: F401 pylint: disable=unused-import
|
||||
|
||||
ENTITY_ID_ALL_DEVICES = group.ENTITY_ID_FORMAT.format("all_devices")
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@ from typing import Optional
|
||||
|
||||
from homeassistant.components import zone
|
||||
from homeassistant.const import (
|
||||
STATE_NOT_HOME,
|
||||
STATE_HOME,
|
||||
ATTR_BATTERY_LEVEL,
|
||||
ATTR_GPS_ACCURACY,
|
||||
ATTR_LATITUDE,
|
||||
ATTR_LONGITUDE,
|
||||
ATTR_BATTERY_LEVEL,
|
||||
STATE_HOME,
|
||||
STATE_NOT_HOME,
|
||||
)
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.helpers.entity_component import EntityComponent
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
"""Provides device automations for Device tracker."""
|
||||
from typing import Dict, List
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import (
|
||||
ATTR_ENTITY_ID,
|
||||
CONF_CONDITION,
|
||||
CONF_DOMAIN,
|
||||
CONF_TYPE,
|
||||
CONF_DEVICE_ID,
|
||||
CONF_DOMAIN,
|
||||
CONF_ENTITY_ID,
|
||||
STATE_NOT_HOME,
|
||||
CONF_TYPE,
|
||||
STATE_HOME,
|
||||
STATE_NOT_HOME,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import condition, config_validation as cv, entity_registry
|
||||
from homeassistant.helpers.typing import ConfigType, TemplateVarsType
|
||||
from homeassistant.helpers.config_validation import DEVICE_CONDITION_BASE_SCHEMA
|
||||
from homeassistant.helpers.typing import ConfigType, TemplateVarsType
|
||||
|
||||
from . import DOMAIN
|
||||
|
||||
CONDITION_TYPES = {"is_home", "is_not_home"}
|
||||
|
||||
@@ -1,27 +1,26 @@
|
||||
"""Device tracker helpers."""
|
||||
import asyncio
|
||||
from typing import Dict, Any, Callable, Optional
|
||||
from types import ModuleType
|
||||
from typing import Any, Callable, Dict, Optional
|
||||
|
||||
import attr
|
||||
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.setup import async_prepare_setup_platform
|
||||
from homeassistant.helpers import config_per_platform
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.helpers.typing import ConfigType, HomeAssistantType
|
||||
from homeassistant.helpers.event import async_track_time_interval
|
||||
from homeassistant.util import dt as dt_util
|
||||
from homeassistant.const import ATTR_LATITUDE, ATTR_LONGITUDE
|
||||
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.helpers import config_per_platform
|
||||
from homeassistant.helpers.event import async_track_time_interval
|
||||
from homeassistant.helpers.typing import ConfigType, HomeAssistantType
|
||||
from homeassistant.setup import async_prepare_setup_platform
|
||||
from homeassistant.util import dt as dt_util
|
||||
|
||||
from .const import (
|
||||
DOMAIN,
|
||||
PLATFORM_TYPE_LEGACY,
|
||||
CONF_SCAN_INTERVAL,
|
||||
DOMAIN,
|
||||
LOGGER,
|
||||
PLATFORM_TYPE_LEGACY,
|
||||
SCAN_INTERVAL,
|
||||
SOURCE_TYPE_ROUTER,
|
||||
LOGGER,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user