Sort imports according to PEP8 for switch (#29654)
This commit is contained in:
1 parent
3d64405896
commit
e0b82440ad
12 files changed
+45
-42
No files matched your search
@@ -6,9 +6,9 @@ components. Instead call the service directly.
|
||||
from homeassistant.components.switch import DOMAIN
|
||||
from homeassistant.const import (
|
||||
ATTR_ENTITY_ID,
|
||||
ENTITY_MATCH_ALL,
|
||||
SERVICE_TURN_OFF,
|
||||
SERVICE_TURN_ON,
|
||||
ENTITY_MATCH_ALL,
|
||||
)
|
||||
from homeassistant.loader import bind_hass
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
"""The test for switch device automation."""
|
||||
import pytest
|
||||
|
||||
from homeassistant.components.switch import DOMAIN
|
||||
from homeassistant.const import STATE_ON, STATE_OFF, CONF_PLATFORM
|
||||
from homeassistant.setup import async_setup_component
|
||||
import homeassistant.components.automation as automation
|
||||
from homeassistant.components.device_automation import (
|
||||
_async_get_device_automations as async_get_device_automations,
|
||||
)
|
||||
from homeassistant.components.switch import DOMAIN
|
||||
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,
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
"""The test for switch device automation."""
|
||||
from datetime import timedelta
|
||||
import pytest
|
||||
from unittest.mock import patch
|
||||
|
||||
from homeassistant.components.switch import DOMAIN
|
||||
from homeassistant.const import STATE_ON, STATE_OFF, CONF_PLATFORM
|
||||
from homeassistant.setup import async_setup_component
|
||||
import pytest
|
||||
|
||||
import homeassistant.components.automation as automation
|
||||
from homeassistant.components.switch import DOMAIN
|
||||
from homeassistant.const import CONF_PLATFORM, STATE_OFF, STATE_ON
|
||||
from homeassistant.helpers import device_registry
|
||||
from homeassistant.setup import async_setup_component
|
||||
import homeassistant.util.dt as dt_util
|
||||
|
||||
from tests.common import (
|
||||
MockConfigEntry,
|
||||
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,22 +1,23 @@
|
||||
"""The test for switch device automation."""
|
||||
from datetime import timedelta
|
||||
|
||||
import pytest
|
||||
|
||||
from homeassistant.components.switch import DOMAIN
|
||||
from homeassistant.const import STATE_ON, STATE_OFF, CONF_PLATFORM
|
||||
from homeassistant.setup import async_setup_component
|
||||
import homeassistant.components.automation as automation
|
||||
from homeassistant.components.switch import DOMAIN
|
||||
from homeassistant.const import CONF_PLATFORM, STATE_OFF, STATE_ON
|
||||
from homeassistant.helpers import device_registry
|
||||
from homeassistant.setup import async_setup_component
|
||||
import homeassistant.util.dt as dt_util
|
||||
|
||||
from tests.common import (
|
||||
MockConfigEntry,
|
||||
async_fire_time_changed,
|
||||
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,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
# pylint: disable=protected-access
|
||||
import unittest
|
||||
|
||||
from homeassistant.setup import setup_component, async_setup_component
|
||||
from homeassistant import core
|
||||
from homeassistant.components import switch
|
||||
from homeassistant.const import STATE_ON, STATE_OFF, CONF_PLATFORM
|
||||
from homeassistant.const import CONF_PLATFORM, STATE_OFF, STATE_ON
|
||||
from homeassistant.setup import async_setup_component, setup_component
|
||||
|
||||
from tests.common import get_test_home_assistant, mock_entity_platform
|
||||
from tests.components.switch import common
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""The tests for the Light Switch platform."""
|
||||
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from tests.components.light import common
|
||||
from tests.components.switch import common as switch_common
|
||||
|
||||
|
||||
Reference in new issue
Block a user