Sort imports according to PEP8 for vesync (#29684)

This commit is contained in:
Bas Nijholt 2019-12-09 11:56:02 +01:00 committed by Franck Nijhof
parent e4e4f78eb0
commit b54c8641b4
5 changed files with 25 additions and 13 deletions

View file

@ -1,20 +1,23 @@
"""Etekcity VeSync integration."""
import logging
import voluptuous as vol
from pyvesync import VeSync
from homeassistant.const import CONF_USERNAME, CONF_PASSWORD
import voluptuous as vol
from homeassistant.config_entries import SOURCE_IMPORT
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.config_entries import SOURCE_IMPORT
from .common import async_process_devices
from .config_flow import configured_instances
from .const import (
DOMAIN,
VS_DISPATCHERS,
VS_DISCOVERY,
VS_SWITCHES,
SERVICE_UPDATE_DEVS,
VS_DISCOVERY,
VS_DISPATCHERS,
VS_MANAGER,
VS_SWITCHES,
)
_LOGGER = logging.getLogger(__name__)

View file

@ -1,6 +1,8 @@
"""Common utilities for VeSync Component."""
import logging
from homeassistant.helpers.entity import ToggleEntity
from .const import VS_SWITCHES
_LOGGER = logging.getLogger(__name__)

View file

@ -1,11 +1,14 @@
"""Config flow utilities."""
import logging
from collections import OrderedDict
import voluptuous as vol
import logging
from pyvesync import VeSync
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from homeassistant.core import callback
from homeassistant.const import CONF_USERNAME, CONF_PASSWORD
from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)

View file

@ -1,10 +1,12 @@
"""Support for Etekcity VeSync switches."""
import logging
from homeassistant.core import callback
from homeassistant.components.switch import SwitchDevice
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from .const import VS_DISCOVERY, VS_DISPATCHERS, VS_SWITCHES, DOMAIN
from .common import VeSyncDevice
from .const import DOMAIN, VS_DISCOVERY, VS_DISPATCHERS, VS_SWITCHES
_LOGGER = logging.getLogger(__name__)

View file

@ -1,8 +1,10 @@
"""Test for vesync config flow."""
from unittest.mock import patch
from homeassistant import data_entry_flow
from homeassistant.components.vesync import config_flow, DOMAIN
from homeassistant.const import CONF_USERNAME, CONF_PASSWORD
from homeassistant.components.vesync import DOMAIN, config_flow
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from tests.common import MockConfigEntry