Sort imports according to PEP8 for pilight (#29673)
This commit is contained in:
parent
04225ba802
commit
d62993c5af
6 changed files with 25 additions and 26 deletions
|
@ -1,25 +1,24 @@
|
||||||
"""Component to create an interface to a Pilight daemon."""
|
"""Component to create an interface to a Pilight daemon."""
|
||||||
import logging
|
from datetime import timedelta
|
||||||
import functools
|
import functools
|
||||||
|
import logging
|
||||||
import socket
|
import socket
|
||||||
import threading
|
import threading
|
||||||
from datetime import timedelta
|
|
||||||
|
|
||||||
import voluptuous as vol
|
|
||||||
|
|
||||||
from pilight import pilight
|
from pilight import pilight
|
||||||
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.helpers.event import track_point_in_utc_time
|
|
||||||
from homeassistant.util import dt as dt_util
|
|
||||||
import homeassistant.helpers.config_validation as cv
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
EVENT_HOMEASSISTANT_START,
|
|
||||||
EVENT_HOMEASSISTANT_STOP,
|
|
||||||
CONF_HOST,
|
CONF_HOST,
|
||||||
CONF_PORT,
|
CONF_PORT,
|
||||||
CONF_WHITELIST,
|
|
||||||
CONF_PROTOCOL,
|
CONF_PROTOCOL,
|
||||||
|
CONF_WHITELIST,
|
||||||
|
EVENT_HOMEASSISTANT_START,
|
||||||
|
EVENT_HOMEASSISTANT_STOP,
|
||||||
)
|
)
|
||||||
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
from homeassistant.helpers.event import track_point_in_utc_time
|
||||||
|
from homeassistant.util import dt as dt_util
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ import datetime
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components import pilight
|
from homeassistant.components import pilight
|
||||||
from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorDevice
|
from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorDevice
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
@ -16,7 +17,6 @@ from homeassistant.helpers import config_validation as cv
|
||||||
from homeassistant.helpers.event import track_point_in_time
|
from homeassistant.helpers.event import track_point_in_time
|
||||||
from homeassistant.util import dt as dt_util
|
from homeassistant.util import dt as dt_util
|
||||||
|
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
CONF_VARIABLE = "variable"
|
CONF_VARIABLE = "variable"
|
||||||
|
|
|
@ -3,11 +3,11 @@ import logging
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import CONF_NAME, CONF_UNIT_OF_MEASUREMENT, CONF_PAYLOAD
|
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
|
||||||
from homeassistant.helpers.entity import Entity
|
|
||||||
from homeassistant.components import pilight
|
from homeassistant.components import pilight
|
||||||
|
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||||
|
from homeassistant.const import CONF_NAME, CONF_PAYLOAD, CONF_UNIT_OF_MEASUREMENT
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
from homeassistant.helpers.entity import Entity
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -3,17 +3,17 @@ import logging
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
import homeassistant.helpers.config_validation as cv
|
|
||||||
from homeassistant.components import pilight
|
from homeassistant.components import pilight
|
||||||
from homeassistant.components.switch import SwitchDevice, PLATFORM_SCHEMA
|
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchDevice
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_NAME,
|
|
||||||
CONF_ID,
|
CONF_ID,
|
||||||
CONF_SWITCHES,
|
CONF_NAME,
|
||||||
CONF_STATE,
|
|
||||||
CONF_PROTOCOL,
|
CONF_PROTOCOL,
|
||||||
|
CONF_STATE,
|
||||||
|
CONF_SWITCHES,
|
||||||
STATE_ON,
|
STATE_ON,
|
||||||
)
|
)
|
||||||
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.restore_state import RestoreEntity
|
from homeassistant.helpers.restore_state import RestoreEntity
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
"""The tests for the pilight component."""
|
"""The tests for the pilight component."""
|
||||||
|
from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
|
import socket
|
||||||
import unittest
|
import unittest
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
import socket
|
|
||||||
from datetime import timedelta
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from homeassistant import core as ha
|
from homeassistant import core as ha
|
||||||
from homeassistant.setup import setup_component
|
|
||||||
from homeassistant.components import pilight
|
from homeassistant.components import pilight
|
||||||
|
from homeassistant.setup import setup_component
|
||||||
from homeassistant.util import dt as dt_util
|
from homeassistant.util import dt as dt_util
|
||||||
|
|
||||||
from tests.common import get_test_home_assistant, assert_setup_component
|
from tests.common import assert_setup_component, get_test_home_assistant
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
"""The tests for the Pilight sensor platform."""
|
"""The tests for the Pilight sensor platform."""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from homeassistant.setup import setup_component
|
|
||||||
import homeassistant.components.sensor as sensor
|
|
||||||
from homeassistant.components import pilight
|
from homeassistant.components import pilight
|
||||||
|
import homeassistant.components.sensor as sensor
|
||||||
|
from homeassistant.setup import setup_component
|
||||||
|
|
||||||
from tests.common import get_test_home_assistant, assert_setup_component, mock_component
|
from tests.common import assert_setup_component, get_test_home_assistant, mock_component
|
||||||
|
|
||||||
HASS = None
|
HASS = None
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue