use isort to sort imports according to PEP8 for cover (#29629)
parent
f355570f17
commit
a3b605bb7d
|
@ -6,31 +6,30 @@ from typing import Any
|
|||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.loader import bind_hass
|
||||
from homeassistant.helpers.entity_component import EntityComponent
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.components import group
|
||||
from homeassistant.const import (
|
||||
SERVICE_CLOSE_COVER,
|
||||
SERVICE_CLOSE_COVER_TILT,
|
||||
SERVICE_OPEN_COVER,
|
||||
SERVICE_OPEN_COVER_TILT,
|
||||
SERVICE_SET_COVER_POSITION,
|
||||
SERVICE_SET_COVER_TILT_POSITION,
|
||||
SERVICE_STOP_COVER,
|
||||
SERVICE_STOP_COVER_TILT,
|
||||
SERVICE_TOGGLE,
|
||||
SERVICE_TOGGLE_COVER_TILT,
|
||||
STATE_CLOSED,
|
||||
STATE_CLOSING,
|
||||
STATE_OPEN,
|
||||
STATE_OPENING,
|
||||
)
|
||||
from homeassistant.helpers.config_validation import ( # noqa: F401
|
||||
PLATFORM_SCHEMA,
|
||||
PLATFORM_SCHEMA_BASE,
|
||||
)
|
||||
from homeassistant.components import group
|
||||
from homeassistant.const import (
|
||||
SERVICE_OPEN_COVER,
|
||||
SERVICE_CLOSE_COVER,
|
||||
SERVICE_SET_COVER_POSITION,
|
||||
SERVICE_STOP_COVER,
|
||||
SERVICE_TOGGLE,
|
||||
SERVICE_OPEN_COVER_TILT,
|
||||
SERVICE_CLOSE_COVER_TILT,
|
||||
SERVICE_STOP_COVER_TILT,
|
||||
SERVICE_SET_COVER_TILT_POSITION,
|
||||
SERVICE_TOGGLE_COVER_TILT,
|
||||
STATE_OPEN,
|
||||
STATE_CLOSED,
|
||||
STATE_OPENING,
|
||||
STATE_CLOSING,
|
||||
)
|
||||
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.helpers.entity_component import EntityComponent
|
||||
from homeassistant.loader import bind_hass
|
||||
|
||||
# mypy: allow-untyped-calls, allow-untyped-defs, no-check-untyped-defs
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
"""Provides device automations for Cover."""
|
||||
from typing import Any, Dict, List
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import (
|
||||
|
@ -8,14 +9,14 @@ from homeassistant.const import (
|
|||
CONF_ABOVE,
|
||||
CONF_BELOW,
|
||||
CONF_CONDITION,
|
||||
CONF_DOMAIN,
|
||||
CONF_TYPE,
|
||||
CONF_DEVICE_ID,
|
||||
CONF_DOMAIN,
|
||||
CONF_ENTITY_ID,
|
||||
STATE_OPEN,
|
||||
CONF_TYPE,
|
||||
STATE_CLOSED,
|
||||
STATE_OPENING,
|
||||
STATE_CLOSING,
|
||||
STATE_OPEN,
|
||||
STATE_OPENING,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import (
|
||||
|
@ -24,8 +25,9 @@ from homeassistant.helpers import (
|
|||
entity_registry,
|
||||
template,
|
||||
)
|
||||
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,
|
||||
SUPPORT_CLOSE,
|
||||
|
|
|
@ -1,30 +1,32 @@
|
|||
"""Provides device automations for Cover."""
|
||||
from typing import List
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.automation import (
|
||||
AutomationActionType,
|
||||
numeric_state as numeric_state_automation,
|
||||
state as state_automation,
|
||||
)
|
||||
from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA
|
||||
from homeassistant.const import (
|
||||
ATTR_SUPPORTED_FEATURES,
|
||||
CONF_ABOVE,
|
||||
CONF_BELOW,
|
||||
CONF_DOMAIN,
|
||||
CONF_TYPE,
|
||||
CONF_PLATFORM,
|
||||
CONF_DEVICE_ID,
|
||||
CONF_DOMAIN,
|
||||
CONF_ENTITY_ID,
|
||||
CONF_PLATFORM,
|
||||
CONF_TYPE,
|
||||
STATE_CLOSED,
|
||||
STATE_CLOSING,
|
||||
STATE_OPEN,
|
||||
STATE_OPENING,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant, CALLBACK_TYPE
|
||||
from homeassistant.core import CALLBACK_TYPE, HomeAssistant
|
||||
from homeassistant.helpers import config_validation as cv, entity_registry
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
from homeassistant.components.automation import (
|
||||
state as state_automation,
|
||||
numeric_state as numeric_state_automation,
|
||||
AutomationActionType,
|
||||
)
|
||||
from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA
|
||||
|
||||
from . import (
|
||||
DOMAIN,
|
||||
SUPPORT_CLOSE,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import intent
|
||||
|
||||
from . import DOMAIN, SERVICE_OPEN_COVER, SERVICE_CLOSE_COVER
|
||||
from . import DOMAIN, SERVICE_CLOSE_COVER, SERVICE_OPEN_COVER
|
||||
|
||||
INTENT_OPEN_COVER = "HassOpenCover"
|
||||
INTENT_CLOSE_COVER = "HassCloseCover"
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
"""The tests for Cover device conditions."""
|
||||
import pytest
|
||||
|
||||
import homeassistant.components.automation as automation
|
||||
from homeassistant.components.cover import DOMAIN
|
||||
from homeassistant.const import (
|
||||
CONF_PLATFORM,
|
||||
STATE_OPEN,
|
||||
STATE_CLOSED,
|
||||
STATE_OPENING,
|
||||
STATE_CLOSING,
|
||||
STATE_OPEN,
|
||||
STATE_OPENING,
|
||||
)
|
||||
from homeassistant.setup import async_setup_component
|
||||
import homeassistant.components.automation as automation
|
||||
from homeassistant.helpers import device_registry
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from tests.common import (
|
||||
MockConfigEntry,
|
||||
assert_lists_same,
|
||||
async_get_device_automation_capabilities,
|
||||
async_get_device_automations,
|
||||
async_mock_service,
|
||||
mock_device_registry,
|
||||
mock_registry,
|
||||
async_get_device_automations,
|
||||
async_get_device_automation_capabilities,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
"""The tests for Cover device triggers."""
|
||||
import pytest
|
||||
|
||||
import homeassistant.components.automation as automation
|
||||
from homeassistant.components.cover import DOMAIN
|
||||
from homeassistant.const import (
|
||||
CONF_PLATFORM,
|
||||
|
@ -9,18 +10,17 @@ from homeassistant.const import (
|
|||
STATE_OPEN,
|
||||
STATE_OPENING,
|
||||
)
|
||||
from homeassistant.setup import async_setup_component
|
||||
import homeassistant.components.automation as automation
|
||||
from homeassistant.helpers import device_registry
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from tests.common import (
|
||||
MockConfigEntry,
|
||||
assert_lists_same,
|
||||
async_get_device_automation_capabilities,
|
||||
async_get_device_automations,
|
||||
async_mock_service,
|
||||
mock_device_registry,
|
||||
mock_registry,
|
||||
async_get_device_automations,
|
||||
async_get_device_automation_capabilities,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
"""The tests for the cover platform."""
|
||||
|
||||
from homeassistant.components.cover import (
|
||||
SERVICE_OPEN_COVER,
|
||||
SERVICE_CLOSE_COVER,
|
||||
SERVICE_OPEN_COVER,
|
||||
intent as cover_intent,
|
||||
)
|
||||
from homeassistant.helpers import intent
|
||||
|
||||
from tests.common import async_mock_service
|
||||
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ from homeassistant.const import (
|
|||
STATE_OPEN,
|
||||
)
|
||||
from homeassistant.core import State
|
||||
|
||||
from tests.common import async_mock_service
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue