Sort imports according to PEP8 for pilight (#29673)

pull/29761/head
Bas Nijholt 2019-12-09 12:10:38 +01:00 committed by Franck Nijhof
parent 04225ba802
commit d62993c5af
6 changed files with 25 additions and 26 deletions

View File

@ -1,25 +1,24 @@
"""Component to create an interface to a Pilight daemon."""
import logging
from datetime import timedelta
import functools
import logging
import socket
import threading
from datetime import timedelta
import voluptuous as vol
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 (
EVENT_HOMEASSISTANT_START,
EVENT_HOMEASSISTANT_STOP,
CONF_HOST,
CONF_PORT,
CONF_WHITELIST,
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__)

View File

@ -3,6 +3,7 @@ import datetime
import logging
import voluptuous as vol
from homeassistant.components import pilight
from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorDevice
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.util import dt as dt_util
_LOGGER = logging.getLogger(__name__)
CONF_VARIABLE = "variable"

View File

@ -3,11 +3,11 @@ import logging
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.sensor import PLATFORM_SCHEMA
from homeassistant.const import CONF_NAME, CONF_PAYLOAD, CONF_UNIT_OF_MEASUREMENT
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
_LOGGER = logging.getLogger(__name__)

View File

@ -3,17 +3,17 @@ import logging
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
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 (
CONF_NAME,
CONF_ID,
CONF_SWITCHES,
CONF_STATE,
CONF_NAME,
CONF_PROTOCOL,
CONF_STATE,
CONF_SWITCHES,
STATE_ON,
)
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.restore_state import RestoreEntity
_LOGGER = logging.getLogger(__name__)

View File

@ -1,18 +1,18 @@
"""The tests for the pilight component."""
from datetime import timedelta
import logging
import socket
import unittest
from unittest.mock import patch
import socket
from datetime import timedelta
import pytest
from homeassistant import core as ha
from homeassistant.setup import setup_component
from homeassistant.components import pilight
from homeassistant.setup import setup_component
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__)

View File

@ -1,11 +1,11 @@
"""The tests for the Pilight sensor platform."""
import logging
from homeassistant.setup import setup_component
import homeassistant.components.sensor as sensor
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