Use relative imports inside integrations (#22235)
* Use relative imports inside integrations * Lint * Fix automation tests * Fix scene imports
This commit is contained in:
1 parent
ab17b22239
commit
4b1de61110
522 files changed
+1834
-1725
No files matched your search
@@ -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__)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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']
|
||||
|
||||
|
||||
Reference in new issue
Block a user