mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 06:07:17 +00:00
move imports in snapcast component (#27940)
This commit is contained in:
parent
2706e3289d
commit
a5ec5b567e
@ -1,6 +1,7 @@
|
|||||||
"""The snapcast component."""
|
"""The snapcast component."""
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import ATTR_ENTITY_ID
|
from homeassistant.const import ATTR_ENTITY_ID
|
||||||
|
@ -2,9 +2,11 @@
|
|||||||
import logging
|
import logging
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
|
import snapcast.control
|
||||||
|
from snapcast.control.server import CONTROL_PORT
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.media_player import MediaPlayerDevice, PLATFORM_SCHEMA
|
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
|
||||||
from homeassistant.components.media_player.const import (
|
from homeassistant.components.media_player.const import (
|
||||||
SUPPORT_SELECT_SOURCE,
|
SUPPORT_SELECT_SOURCE,
|
||||||
SUPPORT_VOLUME_MUTE,
|
SUPPORT_VOLUME_MUTE,
|
||||||
@ -24,12 +26,12 @@ import homeassistant.helpers.config_validation as cv
|
|||||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||||
|
|
||||||
from . import (
|
from . import (
|
||||||
DOMAIN,
|
|
||||||
SERVICE_SNAPSHOT,
|
|
||||||
SERVICE_RESTORE,
|
|
||||||
SERVICE_JOIN,
|
|
||||||
SERVICE_UNJOIN,
|
|
||||||
ATTR_MASTER,
|
ATTR_MASTER,
|
||||||
|
DOMAIN,
|
||||||
|
SERVICE_JOIN,
|
||||||
|
SERVICE_RESTORE,
|
||||||
|
SERVICE_SNAPSHOT,
|
||||||
|
SERVICE_UNJOIN,
|
||||||
)
|
)
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
@ -55,8 +57,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
|||||||
|
|
||||||
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
||||||
"""Set up the Snapcast platform."""
|
"""Set up the Snapcast platform."""
|
||||||
import snapcast.control
|
|
||||||
from snapcast.control.server import CONTROL_PORT
|
|
||||||
|
|
||||||
host = config.get(CONF_HOST)
|
host = config.get(CONF_HOST)
|
||||||
port = config.get(CONF_PORT, CONTROL_PORT)
|
port = config.get(CONF_PORT, CONTROL_PORT)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user