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

+3 -2
View File
@@ -6,8 +6,9 @@ https://home-assistant.io/components/ps4/
"""
import logging
from homeassistant.components.ps4.config_flow import PlayStation4FlowHandler # noqa: pylint: disable=unused-import
from homeassistant.components.ps4.const import DOMAIN # noqa: pylint: disable=unused-import
from .config_flow import ( # noqa pylint: disable=unused-import
PlayStation4FlowHandler)
from .const import DOMAIN # noqa: pylint: disable=unused-import
_LOGGER = logging.getLogger(__name__)
+2 -2
View File
@@ -5,11 +5,11 @@ import logging
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.components.ps4.const import (
DEFAULT_NAME, DEFAULT_REGION, DOMAIN, REGIONS)
from homeassistant.const import (
CONF_CODE, CONF_HOST, CONF_IP_ADDRESS, CONF_NAME, CONF_REGION, CONF_TOKEN)
from .const import DEFAULT_NAME, DEFAULT_REGION, DOMAIN, REGIONS
_LOGGER = logging.getLogger(__name__)
UDP_PORT = 987
+7 -9
View File
@@ -9,20 +9,18 @@ import socket
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.components.media_player import (
MediaPlayerDevice, ENTITY_IMAGE_URL)
ENTITY_IMAGE_URL, MediaPlayerDevice)
from homeassistant.components.media_player.const import (
MEDIA_TYPE_MUSIC, SUPPORT_SELECT_SOURCE,
SUPPORT_STOP, SUPPORT_TURN_OFF, SUPPORT_TURN_ON,
)
from homeassistant.components.ps4.const import DOMAIN as PS4_DOMAIN
MEDIA_TYPE_MUSIC, SUPPORT_SELECT_SOURCE, SUPPORT_STOP, SUPPORT_TURN_OFF,
SUPPORT_TURN_ON)
from homeassistant.const import (
ATTR_ENTITY_ID, ATTR_COMMAND, CONF_HOST, CONF_NAME, CONF_REGION,
CONF_TOKEN, STATE_IDLE, STATE_OFF, STATE_PLAYING,
)
ATTR_COMMAND, ATTR_ENTITY_ID, CONF_HOST, CONF_NAME, CONF_REGION,
CONF_TOKEN, STATE_IDLE, STATE_OFF, STATE_PLAYING)
import homeassistant.helpers.config_validation as cv
from homeassistant.util.json import load_json, save_json
from .const import DOMAIN as PS4_DOMAIN
DEPENDENCIES = ['ps4']