mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 18:27:09 +00:00
Sort imports according to PEP8 for xiaomi_miio (#29677)
This commit is contained in:
parent
0e71c29e00
commit
c7b2c09a61
@ -3,9 +3,9 @@ from miio import AirQualityMonitor, Device, DeviceException
|
|||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.air_quality import (
|
from homeassistant.components.air_quality import (
|
||||||
AirQualityEntity,
|
|
||||||
PLATFORM_SCHEMA,
|
|
||||||
_LOGGER,
|
_LOGGER,
|
||||||
|
PLATFORM_SCHEMA,
|
||||||
|
AirQualityEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.const import CONF_HOST, CONF_NAME, CONF_TOKEN
|
from homeassistant.const import CONF_HOST, CONF_NAME, CONF_TOKEN
|
||||||
from homeassistant.exceptions import PlatformNotReady
|
from homeassistant.exceptions import PlatformNotReady
|
||||||
|
@ -4,7 +4,6 @@ from enum import Enum
|
|||||||
from functools import partial
|
from functools import partial
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import voluptuous as vol
|
|
||||||
from miio import ( # pylint: disable=import-error
|
from miio import ( # pylint: disable=import-error
|
||||||
AirFresh,
|
AirFresh,
|
||||||
AirHumidifier,
|
AirHumidifier,
|
||||||
@ -12,19 +11,19 @@ from miio import ( # pylint: disable=import-error
|
|||||||
Device,
|
Device,
|
||||||
DeviceException,
|
DeviceException,
|
||||||
)
|
)
|
||||||
|
from miio.airfresh import ( # pylint: disable=import-error, import-error
|
||||||
from miio.airfresh import ( # pylint: disable=import-error; pylint: disable=import-error
|
|
||||||
LedBrightness as AirfreshLedBrightness,
|
LedBrightness as AirfreshLedBrightness,
|
||||||
OperationMode as AirfreshOperationMode,
|
OperationMode as AirfreshOperationMode,
|
||||||
)
|
)
|
||||||
from miio.airhumidifier import ( # pylint: disable=import-error; pylint: disable=import-error
|
from miio.airhumidifier import ( # pylint: disable=import-error, import-error
|
||||||
LedBrightness as AirhumidifierLedBrightness,
|
LedBrightness as AirhumidifierLedBrightness,
|
||||||
OperationMode as AirhumidifierOperationMode,
|
OperationMode as AirhumidifierOperationMode,
|
||||||
)
|
)
|
||||||
from miio.airpurifier import ( # pylint: disable=import-error; pylint: disable=import-error
|
from miio.airpurifier import ( # pylint: disable=import-error, import-error
|
||||||
LedBrightness as AirpurifierLedBrightness,
|
LedBrightness as AirpurifierLedBrightness,
|
||||||
OperationMode as AirpurifierOperationMode,
|
OperationMode as AirpurifierOperationMode,
|
||||||
)
|
)
|
||||||
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.fan import PLATFORM_SCHEMA, SUPPORT_SET_SPEED, FanEntity
|
from homeassistant.components.fan import PLATFORM_SCHEMA, SUPPORT_SET_SPEED, FanEntity
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
@ -39,26 +38,27 @@ import homeassistant.helpers.config_validation as cv
|
|||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
SERVICE_SET_BUZZER_ON,
|
|
||||||
SERVICE_SET_BUZZER_OFF,
|
|
||||||
SERVICE_SET_LED_ON,
|
|
||||||
SERVICE_SET_LED_OFF,
|
|
||||||
SERVICE_SET_CHILD_LOCK_ON,
|
|
||||||
SERVICE_SET_CHILD_LOCK_OFF,
|
|
||||||
SERVICE_SET_LED_BRIGHTNESS,
|
|
||||||
SERVICE_SET_FAVORITE_LEVEL,
|
|
||||||
SERVICE_SET_AUTO_DETECT_ON,
|
|
||||||
SERVICE_SET_AUTO_DETECT_OFF,
|
|
||||||
SERVICE_SET_LEARN_MODE_ON,
|
|
||||||
SERVICE_SET_LEARN_MODE_OFF,
|
|
||||||
SERVICE_SET_VOLUME,
|
|
||||||
SERVICE_RESET_FILTER,
|
SERVICE_RESET_FILTER,
|
||||||
SERVICE_SET_EXTRA_FEATURES,
|
SERVICE_SET_AUTO_DETECT_OFF,
|
||||||
SERVICE_SET_TARGET_HUMIDITY,
|
SERVICE_SET_AUTO_DETECT_ON,
|
||||||
SERVICE_SET_DRY_ON,
|
SERVICE_SET_BUZZER_OFF,
|
||||||
|
SERVICE_SET_BUZZER_ON,
|
||||||
|
SERVICE_SET_CHILD_LOCK_OFF,
|
||||||
|
SERVICE_SET_CHILD_LOCK_ON,
|
||||||
SERVICE_SET_DRY_OFF,
|
SERVICE_SET_DRY_OFF,
|
||||||
|
SERVICE_SET_DRY_ON,
|
||||||
|
SERVICE_SET_EXTRA_FEATURES,
|
||||||
|
SERVICE_SET_FAVORITE_LEVEL,
|
||||||
|
SERVICE_SET_LEARN_MODE_OFF,
|
||||||
|
SERVICE_SET_LEARN_MODE_ON,
|
||||||
|
SERVICE_SET_LED_BRIGHTNESS,
|
||||||
|
SERVICE_SET_LED_OFF,
|
||||||
|
SERVICE_SET_LED_ON,
|
||||||
|
SERVICE_SET_TARGET_HUMIDITY,
|
||||||
|
SERVICE_SET_VOLUME,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
DEFAULT_NAME = "Xiaomi Miio Device"
|
DEFAULT_NAME = "Xiaomi Miio Device"
|
||||||
|
@ -34,14 +34,14 @@ from homeassistant.util import color, dt
|
|||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
SERVICE_SET_SCENE,
|
|
||||||
SERVICE_SET_DELAYED_TURN_OFF,
|
|
||||||
SERVICE_REMINDER_ON,
|
|
||||||
SERVICE_REMINDER_OFF,
|
|
||||||
SERVICE_NIGHT_LIGHT_MODE_ON,
|
|
||||||
SERVICE_NIGHT_LIGHT_MODE_OFF,
|
|
||||||
SERVICE_EYECARE_MODE_ON,
|
|
||||||
SERVICE_EYECARE_MODE_OFF,
|
SERVICE_EYECARE_MODE_OFF,
|
||||||
|
SERVICE_EYECARE_MODE_ON,
|
||||||
|
SERVICE_NIGHT_LIGHT_MODE_OFF,
|
||||||
|
SERVICE_NIGHT_LIGHT_MODE_ON,
|
||||||
|
SERVICE_REMINDER_OFF,
|
||||||
|
SERVICE_REMINDER_ON,
|
||||||
|
SERVICE_SET_DELAYED_TURN_OFF,
|
||||||
|
SERVICE_SET_SCENE,
|
||||||
)
|
)
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
@ -26,10 +26,10 @@ import homeassistant.helpers.config_validation as cv
|
|||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
SERVICE_SET_WIFI_LED_ON,
|
|
||||||
SERVICE_SET_WIFI_LED_OFF,
|
|
||||||
SERVICE_SET_POWER_MODE,
|
SERVICE_SET_POWER_MODE,
|
||||||
SERVICE_SET_POWER_PRICE,
|
SERVICE_SET_POWER_PRICE,
|
||||||
|
SERVICE_SET_WIFI_LED_OFF,
|
||||||
|
SERVICE_SET_WIFI_LED_ON,
|
||||||
)
|
)
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
@ -39,11 +39,11 @@ import homeassistant.helpers.config_validation as cv
|
|||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
|
SERVICE_CLEAN_ZONE,
|
||||||
SERVICE_MOVE_REMOTE_CONTROL,
|
SERVICE_MOVE_REMOTE_CONTROL,
|
||||||
SERVICE_MOVE_REMOTE_CONTROL_STEP,
|
SERVICE_MOVE_REMOTE_CONTROL_STEP,
|
||||||
SERVICE_START_REMOTE_CONTROL,
|
SERVICE_START_REMOTE_CONTROL,
|
||||||
SERVICE_STOP_REMOTE_CONTROL,
|
SERVICE_STOP_REMOTE_CONTROL,
|
||||||
SERVICE_CLEAN_ZONE,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user