use isort to sort imports according to PEP8 for ecobee (#29631)
parent
fbd4cf1089
commit
0d5de6a464
|
@ -1,9 +1,9 @@
|
|||
"""Support for ecobee."""
|
||||
import asyncio
|
||||
from datetime import timedelta
|
||||
import voluptuous as vol
|
||||
|
||||
from pyecobee import Ecobee, ECOBEE_API_KEY, ECOBEE_REFRESH_TOKEN, ExpiredTokenError
|
||||
from pyecobee import ECOBEE_API_KEY, ECOBEE_REFRESH_TOKEN, Ecobee, ExpiredTokenError
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import SOURCE_IMPORT
|
||||
from homeassistant.const import CONF_API_KEY
|
||||
|
@ -11,11 +11,11 @@ from homeassistant.helpers import config_validation as cv
|
|||
from homeassistant.util import Throttle
|
||||
|
||||
from .const import (
|
||||
_LOGGER,
|
||||
CONF_REFRESH_TOKEN,
|
||||
DATA_ECOBEE_CONFIG,
|
||||
DOMAIN,
|
||||
ECOBEE_PLATFORMS,
|
||||
_LOGGER,
|
||||
)
|
||||
|
||||
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=180)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
"""Support for Ecobee binary sensors."""
|
||||
from homeassistant.components.binary_sensor import (
|
||||
BinarySensorDevice,
|
||||
DEVICE_CLASS_OCCUPANCY,
|
||||
BinarySensorDevice,
|
||||
)
|
||||
|
||||
from .const import DOMAIN, ECOBEE_MODEL_TO_NAME, MANUFACTURER, _LOGGER
|
||||
from .const import _LOGGER, DOMAIN, ECOBEE_MODEL_TO_NAME, MANUFACTURER
|
||||
|
||||
|
||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
||||
|
|
|
@ -6,37 +6,37 @@ import voluptuous as vol
|
|||
|
||||
from homeassistant.components.climate import ClimateDevice
|
||||
from homeassistant.components.climate.const import (
|
||||
HVAC_MODE_COOL,
|
||||
HVAC_MODE_HEAT,
|
||||
HVAC_MODE_AUTO,
|
||||
HVAC_MODE_OFF,
|
||||
ATTR_TARGET_TEMP_LOW,
|
||||
ATTR_TARGET_TEMP_HIGH,
|
||||
SUPPORT_TARGET_TEMPERATURE,
|
||||
SUPPORT_AUX_HEAT,
|
||||
SUPPORT_TARGET_TEMPERATURE_RANGE,
|
||||
SUPPORT_FAN_MODE,
|
||||
PRESET_AWAY,
|
||||
ATTR_TARGET_TEMP_LOW,
|
||||
CURRENT_HVAC_COOL,
|
||||
CURRENT_HVAC_DRY,
|
||||
CURRENT_HVAC_FAN,
|
||||
CURRENT_HVAC_HEAT,
|
||||
CURRENT_HVAC_IDLE,
|
||||
FAN_AUTO,
|
||||
FAN_ON,
|
||||
CURRENT_HVAC_IDLE,
|
||||
CURRENT_HVAC_HEAT,
|
||||
CURRENT_HVAC_COOL,
|
||||
SUPPORT_PRESET_MODE,
|
||||
HVAC_MODE_AUTO,
|
||||
HVAC_MODE_COOL,
|
||||
HVAC_MODE_HEAT,
|
||||
HVAC_MODE_OFF,
|
||||
PRESET_AWAY,
|
||||
PRESET_NONE,
|
||||
CURRENT_HVAC_FAN,
|
||||
CURRENT_HVAC_DRY,
|
||||
SUPPORT_AUX_HEAT,
|
||||
SUPPORT_FAN_MODE,
|
||||
SUPPORT_PRESET_MODE,
|
||||
SUPPORT_TARGET_TEMPERATURE,
|
||||
SUPPORT_TARGET_TEMPERATURE_RANGE,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
ATTR_ENTITY_ID,
|
||||
STATE_ON,
|
||||
ATTR_TEMPERATURE,
|
||||
STATE_ON,
|
||||
TEMP_FAHRENHEIT,
|
||||
)
|
||||
from homeassistant.util.temperature import convert
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.util.temperature import convert
|
||||
|
||||
from .const import DOMAIN, ECOBEE_MODEL_TO_NAME, MANUFACTURER, _LOGGER
|
||||
from .const import _LOGGER, DOMAIN, ECOBEE_MODEL_TO_NAME, MANUFACTURER
|
||||
from .util import ecobee_date, ecobee_time
|
||||
|
||||
ATTR_COOL_TEMP = "cool_temp"
|
||||
|
|
|
@ -1,19 +1,18 @@
|
|||
"""Config flow to configure ecobee."""
|
||||
import voluptuous as vol
|
||||
|
||||
from pyecobee import (
|
||||
Ecobee,
|
||||
ECOBEE_CONFIG_FILENAME,
|
||||
ECOBEE_API_KEY,
|
||||
ECOBEE_CONFIG_FILENAME,
|
||||
ECOBEE_REFRESH_TOKEN,
|
||||
Ecobee,
|
||||
)
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.const import CONF_API_KEY
|
||||
from homeassistant.core import HomeAssistantError
|
||||
from homeassistant.util.json import load_json
|
||||
|
||||
from .const import CONF_REFRESH_TOKEN, DATA_ECOBEE_CONFIG, DOMAIN, _LOGGER
|
||||
from .const import _LOGGER, CONF_REFRESH_TOKEN, DATA_ECOBEE_CONFIG, DOMAIN
|
||||
|
||||
|
||||
class EcobeeFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
"""Support for Ecobee Send Message service."""
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.notify import PLATFORM_SCHEMA, BaseNotificationService
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.components.notify import BaseNotificationService, PLATFORM_SCHEMA
|
||||
|
||||
from .const import CONF_INDEX, DOMAIN
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ from homeassistant.const import (
|
|||
)
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
from .const import DOMAIN, ECOBEE_MODEL_TO_NAME, MANUFACTURER, _LOGGER
|
||||
from .const import _LOGGER, DOMAIN, ECOBEE_MODEL_TO_NAME, MANUFACTURER
|
||||
|
||||
SENSOR_TYPES = {
|
||||
"temperature": ["Temperature", TEMP_FAHRENHEIT],
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
"""Validation utility functions for ecobee services."""
|
||||
from datetime import datetime
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
|
||||
|
|
|
@ -15,11 +15,11 @@ from homeassistant.components.weather import (
|
|||
from homeassistant.const import TEMP_FAHRENHEIT
|
||||
|
||||
from .const import (
|
||||
_LOGGER,
|
||||
DOMAIN,
|
||||
ECOBEE_MODEL_TO_NAME,
|
||||
ECOBEE_WEATHER_SYMBOL_TO_HASS,
|
||||
MANUFACTURER,
|
||||
_LOGGER,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
"""The test for the Ecobee thermostat module."""
|
||||
import unittest
|
||||
from unittest import mock
|
||||
import homeassistant.const as const
|
||||
|
||||
from homeassistant.components.ecobee import climate as ecobee
|
||||
import homeassistant.const as const
|
||||
from homeassistant.const import STATE_OFF
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
"""Tests for the ecobee config flow."""
|
||||
import pytest
|
||||
from unittest.mock import patch
|
||||
|
||||
from pyecobee import ECOBEE_API_KEY, ECOBEE_REFRESH_TOKEN
|
||||
import pytest
|
||||
|
||||
from homeassistant import data_entry_flow
|
||||
from homeassistant.components.ecobee import config_flow
|
||||
|
@ -12,6 +12,7 @@ from homeassistant.components.ecobee.const import (
|
|||
DOMAIN,
|
||||
)
|
||||
from homeassistant.const import CONF_API_KEY
|
||||
|
||||
from tests.common import MockConfigEntry, mock_coro
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue