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

@@ -6,15 +6,14 @@ import voluptuous as vol
from homeassistant.components import rfxtrx
from homeassistant.components.binary_sensor import (
DEVICE_CLASSES_SCHEMA, PLATFORM_SCHEMA, BinarySensorDevice)
from homeassistant.components.rfxtrx import (
ATTR_NAME, CONF_AUTOMATIC_ADD, CONF_DATA_BITS, CONF_DEVICES,
CONF_FIRE_EVENT, CONF_OFF_DELAY)
from homeassistant.const import (
CONF_COMMAND_OFF, CONF_COMMAND_ON, CONF_DEVICE_CLASS, CONF_NAME)
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers import event as evt
from homeassistant.util import dt as dt_util
from homeassistant.util import slugify
from homeassistant.helpers import config_validation as cv, event as evt
from homeassistant.util import dt as dt_util, slugify
from . import (
ATTR_NAME, CONF_AUTOMATIC_ADD, CONF_DATA_BITS, CONF_DEVICES,
CONF_FIRE_EVENT, CONF_OFF_DELAY)
_LOGGER = logging.getLogger(__name__)
+5 -4
View File
@@ -2,13 +2,14 @@
import voluptuous as vol
from homeassistant.components import rfxtrx
from homeassistant.components.cover import CoverDevice, PLATFORM_SCHEMA
from homeassistant.components.cover import PLATFORM_SCHEMA, CoverDevice
from homeassistant.const import CONF_NAME
from homeassistant.components.rfxtrx import (
CONF_AUTOMATIC_ADD, CONF_FIRE_EVENT, DEFAULT_SIGNAL_REPETITIONS,
CONF_SIGNAL_REPETITIONS, CONF_DEVICES)
from homeassistant.helpers import config_validation as cv
from . import (
CONF_AUTOMATIC_ADD, CONF_DEVICES, CONF_FIRE_EVENT, CONF_SIGNAL_REPETITIONS,
DEFAULT_SIGNAL_REPETITIONS)
DEPENDENCIES = ['rfxtrx']
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
+5 -4
View File
@@ -5,13 +5,14 @@ import voluptuous as vol
from homeassistant.components import rfxtrx
from homeassistant.components.light import (
ATTR_BRIGHTNESS, SUPPORT_BRIGHTNESS, Light, PLATFORM_SCHEMA)
ATTR_BRIGHTNESS, PLATFORM_SCHEMA, SUPPORT_BRIGHTNESS, Light)
from homeassistant.const import CONF_NAME
from homeassistant.components.rfxtrx import (
CONF_AUTOMATIC_ADD, CONF_FIRE_EVENT, DEFAULT_SIGNAL_REPETITIONS,
CONF_SIGNAL_REPETITIONS, CONF_DEVICES)
from homeassistant.helpers import config_validation as cv
from . import (
CONF_AUTOMATIC_ADD, CONF_DEVICES, CONF_FIRE_EVENT, CONF_SIGNAL_REPETITIONS,
DEFAULT_SIGNAL_REPETITIONS)
DEPENDENCIES = ['rfxtrx']
_LOGGER = logging.getLogger(__name__)
+4 -3
View File
@@ -4,15 +4,16 @@ import logging
import voluptuous as vol
from homeassistant.components import rfxtrx
from homeassistant.components.rfxtrx import (
ATTR_DATA_TYPE, ATTR_FIRE_EVENT, CONF_AUTOMATIC_ADD, CONF_DATA_TYPE,
CONF_DEVICES, CONF_FIRE_EVENT, DATA_TYPES)
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import ATTR_ENTITY_ID, ATTR_NAME, CONF_NAME
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
from homeassistant.util import slugify
from . import (
ATTR_DATA_TYPE, ATTR_FIRE_EVENT, CONF_AUTOMATIC_ADD, CONF_DATA_TYPE,
CONF_DEVICES, CONF_FIRE_EVENT, DATA_TYPES)
DEPENDENCIES = ['rfxtrx']
_LOGGER = logging.getLogger(__name__)
+6 -5
View File
@@ -4,12 +4,13 @@ import logging
import voluptuous as vol
from homeassistant.components import rfxtrx
from homeassistant.components.switch import SwitchDevice, PLATFORM_SCHEMA
from homeassistant.components.rfxtrx import (
CONF_AUTOMATIC_ADD, CONF_FIRE_EVENT, DEFAULT_SIGNAL_REPETITIONS,
CONF_SIGNAL_REPETITIONS, CONF_DEVICES)
from homeassistant.helpers import config_validation as cv
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchDevice
from homeassistant.const import CONF_NAME
from homeassistant.helpers import config_validation as cv
from . import (
CONF_AUTOMATIC_ADD, CONF_DEVICES, CONF_FIRE_EVENT, CONF_SIGNAL_REPETITIONS,
DEFAULT_SIGNAL_REPETITIONS)
DEPENDENCIES = ['rfxtrx']