From b6cd6135c2a217800fe1fb9a9efc537d7ecd56c9 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Mon, 9 Dec 2019 11:53:51 +0100 Subject: [PATCH] Sort imports according to PEP8 for wemo (#29685) --- homeassistant/components/wemo/__init__.py | 5 ++--- homeassistant/components/wemo/config_flow.py | 2 +- homeassistant/components/wemo/fan.py | 14 +++++++------- homeassistant/components/wemo/light.py | 6 +++--- homeassistant/components/wemo/switch.py | 4 ++-- 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/homeassistant/components/wemo/__init__.py b/homeassistant/components/wemo/__init__.py index fe63f10aeba..9b1c4cd465f 100644 --- a/homeassistant/components/wemo/__init__.py +++ b/homeassistant/components/wemo/__init__.py @@ -7,10 +7,9 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.components.discovery import SERVICE_WEMO -from homeassistant.helpers import config_validation as cv -from homeassistant.helpers import discovery - from homeassistant.const import EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP +from homeassistant.helpers import config_validation as cv, discovery + from .const import DOMAIN # Mapping from Wemo model_name to component. diff --git a/homeassistant/components/wemo/config_flow.py b/homeassistant/components/wemo/config_flow.py index 21c911a66ce..9ad7dda10ba 100644 --- a/homeassistant/components/wemo/config_flow.py +++ b/homeassistant/components/wemo/config_flow.py @@ -2,8 +2,8 @@ import pywemo -from homeassistant.helpers import config_entry_flow from homeassistant import config_entries +from homeassistant.helpers import config_entry_flow from . import DOMAIN diff --git a/homeassistant/components/wemo/fan.py b/homeassistant/components/wemo/fan.py index 4a8be4fba81..5974a9eae8c 100644 --- a/homeassistant/components/wemo/fan.py +++ b/homeassistant/components/wemo/fan.py @@ -1,24 +1,24 @@ """Support for WeMo humidifier.""" import asyncio -import logging from datetime import timedelta +import logging import async_timeout from pywemo import discovery import requests import voluptuous as vol -import homeassistant.helpers.config_validation as cv from homeassistant.components.fan import ( - SUPPORT_SET_SPEED, - FanEntity, - SPEED_OFF, + SPEED_HIGH, SPEED_LOW, SPEED_MEDIUM, - SPEED_HIGH, + SPEED_OFF, + SUPPORT_SET_SPEED, + FanEntity, ) -from homeassistant.exceptions import PlatformNotReady from homeassistant.const import ATTR_ENTITY_ID +from homeassistant.exceptions import PlatformNotReady +import homeassistant.helpers.config_validation as cv from . import SUBSCRIPTION_REGISTRY from .const import DOMAIN, SERVICE_RESET_FILTER_LIFE, SERVICE_SET_HUMIDITY diff --git a/homeassistant/components/wemo/light.py b/homeassistant/components/wemo/light.py index dab96eb8c94..37113a09bd1 100644 --- a/homeassistant/components/wemo/light.py +++ b/homeassistant/components/wemo/light.py @@ -1,7 +1,7 @@ """Support for Belkin WeMo lights.""" import asyncio -import logging from datetime import timedelta +import logging import async_timeout from pywemo import discovery @@ -9,15 +9,15 @@ import requests from homeassistant import util from homeassistant.components.light import ( - Light, ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_HS_COLOR, ATTR_TRANSITION, SUPPORT_BRIGHTNESS, - SUPPORT_COLOR_TEMP, SUPPORT_COLOR, + SUPPORT_COLOR_TEMP, SUPPORT_TRANSITION, + Light, ) from homeassistant.exceptions import PlatformNotReady import homeassistant.util.color as color_util diff --git a/homeassistant/components/wemo/switch.py b/homeassistant/components/wemo/switch.py index 1c0606b489d..432a0ddf2cc 100644 --- a/homeassistant/components/wemo/switch.py +++ b/homeassistant/components/wemo/switch.py @@ -1,16 +1,16 @@ """Support for WeMo switches.""" import asyncio -import logging from datetime import datetime, timedelta +import logging import async_timeout from pywemo import discovery import requests from homeassistant.components.switch import SwitchDevice +from homeassistant.const import STATE_OFF, STATE_ON, STATE_STANDBY, STATE_UNKNOWN from homeassistant.exceptions import PlatformNotReady from homeassistant.util import convert -from homeassistant.const import STATE_OFF, STATE_ON, STATE_STANDBY, STATE_UNKNOWN from . import SUBSCRIPTION_REGISTRY from .const import DOMAIN