Apply isort on rfxtrx classes (#27615)
* Move imports in rfxtrx component * Apply isort on rfxtrx files * Update test_switch.py
This commit is contained in:
parent
288d370ef5
commit
de7963544f
10 changed files with 24 additions and 16 deletions
|
@ -1,7 +1,8 @@
|
|||
"""Support for RFXtrx devices."""
|
||||
from collections import OrderedDict
|
||||
import binascii
|
||||
from collections import OrderedDict
|
||||
import logging
|
||||
|
||||
import RFXtrx as rfxtrxmod
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -13,8 +14,8 @@ from homeassistant.const import (
|
|||
CONF_DEVICES,
|
||||
EVENT_HOMEASSISTANT_START,
|
||||
EVENT_HOMEASSISTANT_STOP,
|
||||
TEMP_CELSIUS,
|
||||
POWER_WATT,
|
||||
TEMP_CELSIUS,
|
||||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
"""Support for RFXtrx binary sensors."""
|
||||
import logging
|
||||
|
||||
import RFXtrx as rfxtrxmod
|
||||
import voluptuous as vol
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
"""Support for RFXtrx lights."""
|
||||
import logging
|
||||
|
||||
import RFXtrx as rfxtrxmod
|
||||
import voluptuous as vol
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
"""Support for RFXtrx sensors."""
|
||||
import logging
|
||||
import voluptuous as vol
|
||||
|
||||
from RFXtrx import SensorEvent
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components import rfxtrx
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
"""Support for RFXtrx switches."""
|
||||
import logging
|
||||
|
||||
import RFXtrx as rfxtrxmod
|
||||
import voluptuous as vol
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
"""The tests for the Rfxtrx cover platform."""
|
||||
import unittest
|
||||
import pytest
|
||||
import RFXtrx as rfxtrxmod
|
||||
|
||||
from homeassistant.setup import setup_component
|
||||
import RFXtrx as rfxtrxmod
|
||||
import pytest
|
||||
|
||||
from homeassistant.components import rfxtrx as rfxtrx_core
|
||||
from homeassistant.setup import setup_component
|
||||
|
||||
from tests.common import get_test_home_assistant, mock_component
|
||||
|
||||
|
|
|
@ -4,9 +4,10 @@ import unittest
|
|||
|
||||
import pytest
|
||||
|
||||
from homeassistant.components import rfxtrx as rfxtrx
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.setup import setup_component
|
||||
from homeassistant.components import rfxtrx as rfxtrx
|
||||
|
||||
from tests.common import get_test_home_assistant
|
||||
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
"""The tests for the Rfxtrx light platform."""
|
||||
import unittest
|
||||
import pytest
|
||||
import RFXtrx as rfxtrxmod
|
||||
|
||||
from homeassistant.setup import setup_component
|
||||
import RFXtrx as rfxtrxmod
|
||||
import pytest
|
||||
|
||||
from homeassistant.components import rfxtrx as rfxtrx_core
|
||||
from homeassistant.setup import setup_component
|
||||
|
||||
from tests.common import get_test_home_assistant, mock_component
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@ import unittest
|
|||
|
||||
import pytest
|
||||
|
||||
from homeassistant.setup import setup_component
|
||||
from homeassistant.components import rfxtrx as rfxtrx_core
|
||||
from homeassistant.const import TEMP_CELSIUS
|
||||
from homeassistant.setup import setup_component
|
||||
|
||||
from tests.common import get_test_home_assistant, mock_component
|
||||
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
"""The tests for the Rfxtrx switch platform."""
|
||||
"""The tests for the RFXtrx switch platform."""
|
||||
import unittest
|
||||
import pytest
|
||||
import RFXtrx as rfxtrxmod
|
||||
|
||||
from homeassistant.setup import setup_component
|
||||
import RFXtrx as rfxtrxmod
|
||||
import pytest
|
||||
|
||||
from homeassistant.components import rfxtrx as rfxtrx_core
|
||||
from homeassistant.setup import setup_component
|
||||
|
||||
from tests.common import get_test_home_assistant, mock_component
|
||||
|
||||
|
||||
@pytest.mark.skipif("os.environ.get('RFXTRX') != 'RUN'")
|
||||
class TestSwitchRfxtrx(unittest.TestCase):
|
||||
"""Test the Rfxtrx switch platform."""
|
||||
"""Test the RFXtrx switch platform."""
|
||||
|
||||
def setUp(self):
|
||||
"""Set up things to be run when tests are started."""
|
||||
|
|
Loading…
Add table
Reference in a new issue