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 -7
View File
@@ -1,15 +1,15 @@
"""Support for the Tuya climate devices."""
from homeassistant.components.climate import ClimateDevice, ENTITY_ID_FORMAT
from homeassistant.components.climate import ENTITY_ID_FORMAT, ClimateDevice
from homeassistant.components.climate.const import (
STATE_AUTO, STATE_COOL, STATE_ECO,
STATE_FAN_ONLY, STATE_HEAT, SUPPORT_FAN_MODE, SUPPORT_ON_OFF,
SUPPORT_OPERATION_MODE, SUPPORT_TARGET_TEMPERATURE)
from homeassistant.components.fan import SPEED_LOW, SPEED_MEDIUM, SPEED_HIGH
from homeassistant.components.tuya import DATA_TUYA, TuyaDevice
STATE_AUTO, STATE_COOL, STATE_ECO, STATE_FAN_ONLY, STATE_HEAT,
SUPPORT_FAN_MODE, SUPPORT_ON_OFF, SUPPORT_OPERATION_MODE,
SUPPORT_TARGET_TEMPERATURE)
from homeassistant.components.fan import SPEED_HIGH, SPEED_LOW, SPEED_MEDIUM
from homeassistant.const import (
ATTR_TEMPERATURE, PRECISION_WHOLE, TEMP_CELSIUS, TEMP_FAHRENHEIT)
from . import DATA_TUYA, TuyaDevice
DEPENDENCIES = ['tuya']
DEVICE_TYPE = 'climate'
+3 -2
View File
@@ -1,7 +1,8 @@
"""Support for Tuya covers."""
from homeassistant.components.cover import (
CoverDevice, ENTITY_ID_FORMAT, SUPPORT_OPEN, SUPPORT_CLOSE, SUPPORT_STOP)
from homeassistant.components.tuya import DATA_TUYA, TuyaDevice
ENTITY_ID_FORMAT, SUPPORT_CLOSE, SUPPORT_OPEN, SUPPORT_STOP, CoverDevice)
from . import DATA_TUYA, TuyaDevice
DEPENDENCIES = ['tuya']
+3 -2
View File
@@ -1,9 +1,10 @@
"""Support for Tuya fans."""
from homeassistant.components.fan import (
ENTITY_ID_FORMAT, FanEntity, SUPPORT_OSCILLATE, SUPPORT_SET_SPEED)
from homeassistant.components.tuya import DATA_TUYA, TuyaDevice
ENTITY_ID_FORMAT, SUPPORT_OSCILLATE, SUPPORT_SET_SPEED, FanEntity)
from homeassistant.const import STATE_OFF
from . import DATA_TUYA, TuyaDevice
DEPENDENCIES = ['tuya']
+3 -3
View File
@@ -1,11 +1,11 @@
"""Support for the Tuya lights."""
from homeassistant.components.light import (
ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_HS_COLOR, ENTITY_ID_FORMAT,
SUPPORT_BRIGHTNESS, SUPPORT_COLOR_TEMP, SUPPORT_COLOR, Light)
from homeassistant.components.tuya import DATA_TUYA, TuyaDevice
SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_COLOR_TEMP, Light)
from homeassistant.util import color as colorutil
from . import DATA_TUYA, TuyaDevice
DEPENDENCIES = ['tuya']
+3 -2
View File
@@ -1,6 +1,7 @@
"""Support for the Tuya scenes."""
from homeassistant.components.scene import Scene, DOMAIN
from homeassistant.components.tuya import DATA_TUYA, TuyaDevice
from homeassistant.components.scene import DOMAIN, Scene
from . import DATA_TUYA, TuyaDevice
DEPENDENCIES = ['tuya']
+2 -1
View File
@@ -1,6 +1,7 @@
"""Support for Tuya switches."""
from homeassistant.components.switch import ENTITY_ID_FORMAT, SwitchDevice
from homeassistant.components.tuya import DATA_TUYA, TuyaDevice
from . import DATA_TUYA, TuyaDevice
DEPENDENCIES = ['tuya']