Use relative imports inside integrations (#22235)

* Use relative imports inside integrations

* Lint

* Fix automation tests

* Fix scene imports
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2019-03-20 22:56:46 -07:00
1 parent ab17b22239
commit 4b1de61110
522 files changed
+1834 -1725

No files matched your search

+7 -6
View File
@@ -3,12 +3,6 @@ import logging
import voluptuous as vol
from homeassistant.components.lcn.const import (
CONF_CONNECTIONS, CONF_DIM_MODE, CONF_DIMMABLE, CONF_MOTOR, CONF_OUTPUT,
CONF_SK_NUM_TRIES, CONF_SOURCE, CONF_TRANSITION, DATA_LCN, DEFAULT_NAME,
DIM_MODES, DOMAIN, LED_PORTS, LOGICOP_PORTS, MOTOR_PORTS, OUTPUT_PORTS,
PATTERN_ADDRESS, RELAY_PORTS, S0_INPUTS, SETPOINTS, THRESHOLDS, VAR_UNITS,
VARIABLES)
from homeassistant.const import (
CONF_ADDRESS, CONF_COVERS, CONF_HOST, CONF_LIGHTS, CONF_NAME,
CONF_PASSWORD, CONF_PORT, CONF_SENSORS, CONF_SWITCHES,
@@ -17,6 +11,13 @@ import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.discovery import async_load_platform
from homeassistant.helpers.entity import Entity
from .const import (
CONF_CONNECTIONS, CONF_DIM_MODE, CONF_DIMMABLE, CONF_MOTOR, CONF_OUTPUT,
CONF_SK_NUM_TRIES, CONF_SOURCE, CONF_TRANSITION, DATA_LCN, DEFAULT_NAME,
DIM_MODES, DOMAIN, LED_PORTS, LOGICOP_PORTS, MOTOR_PORTS, OUTPUT_PORTS,
PATTERN_ADDRESS, RELAY_PORTS, S0_INPUTS, SETPOINTS, THRESHOLDS, VAR_UNITS,
VARIABLES)
_LOGGER = logging.getLogger(__name__)
REQUIREMENTS = ['pypck==0.5.9']
+3 -3
View File
@@ -1,10 +1,10 @@
"""Support for LCN covers."""
from homeassistant.components.cover import CoverDevice
from homeassistant.components.lcn import LcnDevice, get_connection
from homeassistant.components.lcn.const import (
CONF_CONNECTIONS, CONF_MOTOR, DATA_LCN)
from homeassistant.const import CONF_ADDRESS
from . import LcnDevice, get_connection
from .const import CONF_CONNECTIONS, CONF_MOTOR, DATA_LCN
DEPENDENCIES = ['lcn']
+5 -4
View File
@@ -1,13 +1,14 @@
"""Support for LCN lights."""
from homeassistant.components.lcn import LcnDevice, get_connection
from homeassistant.components.lcn.const import (
CONF_CONNECTIONS, CONF_DIMMABLE, CONF_OUTPUT, CONF_TRANSITION, DATA_LCN,
OUTPUT_PORTS)
from homeassistant.components.light import (
ATTR_BRIGHTNESS, ATTR_TRANSITION, SUPPORT_BRIGHTNESS, SUPPORT_TRANSITION,
Light)
from homeassistant.const import CONF_ADDRESS
from . import LcnDevice, get_connection
from .const import (
CONF_CONNECTIONS, CONF_DIMMABLE, CONF_OUTPUT, CONF_TRANSITION, DATA_LCN,
OUTPUT_PORTS)
DEPENDENCIES = ['lcn']
+4 -3
View File
@@ -1,9 +1,10 @@
"""Support for LCN sensors."""
from homeassistant.components.lcn import LcnDevice, get_connection
from homeassistant.components.lcn.const import (
from homeassistant.const import CONF_ADDRESS, CONF_UNIT_OF_MEASUREMENT
from . import LcnDevice, get_connection
from .const import (
CONF_CONNECTIONS, CONF_SOURCE, DATA_LCN, LED_PORTS, S0_INPUTS, SETPOINTS,
THRESHOLDS, VARIABLES)
from homeassistant.const import CONF_ADDRESS, CONF_UNIT_OF_MEASUREMENT
DEPENDENCIES = ['lcn']
+3 -3
View File
@@ -1,10 +1,10 @@
"""Support for LCN switches."""
from homeassistant.components.lcn import LcnDevice, get_connection
from homeassistant.components.lcn.const import (
CONF_CONNECTIONS, CONF_OUTPUT, DATA_LCN, OUTPUT_PORTS)
from homeassistant.components.switch import SwitchDevice
from homeassistant.const import CONF_ADDRESS
from . import LcnDevice, get_connection
from .const import CONF_CONNECTIONS, CONF_OUTPUT, DATA_LCN, OUTPUT_PORTS
DEPENDENCIES = ['lcn']