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

@@ -2,10 +2,10 @@
import logging
from homeassistant.components.binary_sensor import (
BinarySensorDevice, ENTITY_ID_FORMAT)
from homeassistant.components.fibaro import (
FIBARO_DEVICES, FibaroDevice)
from homeassistant.const import (CONF_DEVICE_CLASS, CONF_ICON)
ENTITY_ID_FORMAT, BinarySensorDevice)
from homeassistant.const import CONF_DEVICE_CLASS, CONF_ICON
from . import FIBARO_DEVICES, FibaroDevice
DEPENDENCIES = ['fibaro']
+3 -3
View File
@@ -2,9 +2,9 @@
import logging
from homeassistant.components.cover import (
CoverDevice, ENTITY_ID_FORMAT, ATTR_POSITION, ATTR_TILT_POSITION)
from homeassistant.components.fibaro import (
FIBARO_DEVICES, FibaroDevice)
ATTR_POSITION, ATTR_TILT_POSITION, ENTITY_ID_FORMAT, CoverDevice)
from . import FIBARO_DEVICES, FibaroDevice
DEPENDENCIES = ['fibaro']
+5 -6
View File
@@ -1,18 +1,17 @@
"""Support for Fibaro lights."""
import logging
import asyncio
from functools import partial
import logging
from homeassistant.const import (
CONF_WHITE_VALUE)
from homeassistant.components.fibaro import (
FIBARO_DEVICES, FibaroDevice,
CONF_DIMMING, CONF_COLOR, CONF_RESET_COLOR)
from homeassistant.components.light import (
ATTR_BRIGHTNESS, ATTR_HS_COLOR, ATTR_WHITE_VALUE, ENTITY_ID_FORMAT,
SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_WHITE_VALUE, Light)
from homeassistant.const import CONF_WHITE_VALUE
import homeassistant.util.color as color_util
from . import (
CONF_COLOR, CONF_DIMMING, CONF_RESET_COLOR, FIBARO_DEVICES, FibaroDevice)
_LOGGER = logging.getLogger(__name__)
DEPENDENCIES = ['fibaro']
+3 -4
View File
@@ -1,10 +1,9 @@
"""Support for Fibaro scenes."""
import logging
from homeassistant.components.scene import (
Scene)
from homeassistant.components.fibaro import (
FIBARO_DEVICES, FibaroDevice)
from homeassistant.components.scene import Scene
from . import FIBARO_DEVICES, FibaroDevice
DEPENDENCIES = ['fibaro']
+6 -6
View File
@@ -1,13 +1,13 @@
"""Support for Fibaro sensors."""
import logging
from homeassistant.const import (
DEVICE_CLASS_TEMPERATURE, DEVICE_CLASS_HUMIDITY,
DEVICE_CLASS_ILLUMINANCE, TEMP_CELSIUS, TEMP_FAHRENHEIT)
from homeassistant.helpers.entity import Entity
from homeassistant.components.sensor import ENTITY_ID_FORMAT
from homeassistant.components.fibaro import (
FIBARO_DEVICES, FibaroDevice)
from homeassistant.const import (
DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_ILLUMINANCE, DEVICE_CLASS_TEMPERATURE,
TEMP_CELSIUS, TEMP_FAHRENHEIT)
from homeassistant.helpers.entity import Entity
from . import FIBARO_DEVICES, FibaroDevice
SENSOR_TYPES = {
'com.fibaro.temperatureSensor':
+3 -3
View File
@@ -1,10 +1,10 @@
"""Support for Fibaro switches."""
import logging
from homeassistant.util import convert
from homeassistant.components.switch import ENTITY_ID_FORMAT, SwitchDevice
from homeassistant.components.fibaro import (
FIBARO_DEVICES, FibaroDevice)
from homeassistant.util import convert
from . import FIBARO_DEVICES, FibaroDevice
DEPENDENCIES = ['fibaro']
_LOGGER = logging.getLogger(__name__)