Sort imports according to PEP8 for device_automation (#29707)
This commit is contained in:
parent
ea39d5b428
commit
2cd55bbb87
3 changed files with 10 additions and 11 deletions
|
@ -1,22 +1,21 @@
|
|||
"""Helpers for device automations."""
|
||||
import asyncio
|
||||
import logging
|
||||
from typing import Any, List, MutableMapping
|
||||
from types import ModuleType
|
||||
from typing import Any, List, MutableMapping
|
||||
|
||||
import voluptuous as vol
|
||||
import voluptuous_serialize
|
||||
|
||||
from homeassistant.const import CONF_PLATFORM, CONF_DOMAIN, CONF_DEVICE_ID
|
||||
from homeassistant.components import websocket_api
|
||||
from homeassistant.const import CONF_DEVICE_ID, CONF_DOMAIN, CONF_PLATFORM
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.entity_registry import async_entries_for_device
|
||||
from homeassistant.loader import async_get_integration, IntegrationNotFound
|
||||
from homeassistant.loader import IntegrationNotFound, async_get_integration
|
||||
|
||||
from .exceptions import InvalidDeviceAutomationConfig
|
||||
|
||||
|
||||
# mypy: allow-untyped-calls, allow-untyped-defs
|
||||
|
||||
DOMAIN = "device_automation"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
"""Device automation helpers for toggle entity."""
|
||||
from typing import Any, Dict, List
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.core import Context, HomeAssistant, CALLBACK_TYPE
|
||||
from homeassistant.components.automation import (
|
||||
state as state_automation,
|
||||
AutomationActionType,
|
||||
state as state_automation,
|
||||
)
|
||||
from homeassistant.components.device_automation.const import (
|
||||
CONF_IS_OFF,
|
||||
|
@ -24,11 +24,12 @@ from homeassistant.const import (
|
|||
CONF_PLATFORM,
|
||||
CONF_TYPE,
|
||||
)
|
||||
from homeassistant.helpers.entity_registry import async_entries_for_device
|
||||
from homeassistant.core import CALLBACK_TYPE, Context, HomeAssistant
|
||||
from homeassistant.helpers import condition, config_validation as cv
|
||||
from homeassistant.helpers.entity_registry import async_entries_for_device
|
||||
from homeassistant.helpers.typing import ConfigType, TemplateVarsType
|
||||
from . import TRIGGER_BASE_SCHEMA
|
||||
|
||||
from . import TRIGGER_BASE_SCHEMA
|
||||
|
||||
# mypy: allow-untyped-calls, allow-untyped-defs
|
||||
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
"""The test for light device automation."""
|
||||
import pytest
|
||||
|
||||
from homeassistant.setup import async_setup_component
|
||||
import homeassistant.components.automation as automation
|
||||
from homeassistant.components.websocket_api.const import TYPE_RESULT
|
||||
from homeassistant.const import STATE_ON, STATE_OFF, CONF_PLATFORM
|
||||
from homeassistant.const import CONF_PLATFORM, STATE_OFF, STATE_ON
|
||||
from homeassistant.helpers import device_registry
|
||||
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from tests.common import (
|
||||
MockConfigEntry,
|
||||
|
|
Loading…
Add table
Reference in a new issue