move soundtouch services to soundtouch domain (#29140)

This commit is contained in:
Raman Gupta 2019-11-27 19:47:45 -05:00 committed by Paulus Schoutsen
parent f6dd51a7fb
commit 9fd058aa33
3 changed files with 50 additions and 6 deletions

View File

@ -0,0 +1,6 @@
"""Constants for the Bose Soundtouch component."""
DOMAIN = "soundtouch"
SERVICE_PLAY_EVERYWHERE = "play_everywhere"
SERVICE_CREATE_ZONE = "create_zone"
SERVICE_ADD_ZONE_SLAVE = "add_zone_slave"
SERVICE_REMOVE_ZONE_SLAVE = "remove_zone_slave"

View File

@ -6,7 +6,6 @@ import voluptuous as vol
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player.const import (
DOMAIN,
SUPPORT_NEXT_TRACK,
SUPPORT_PAUSE,
SUPPORT_PLAY,
@ -29,12 +28,15 @@ from homeassistant.const import (
)
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
from .const import (
DOMAIN,
SERVICE_ADD_ZONE_SLAVE,
SERVICE_CREATE_ZONE,
SERVICE_PLAY_EVERYWHERE,
SERVICE_REMOVE_ZONE_SLAVE,
)
SERVICE_PLAY_EVERYWHERE = "soundtouch_play_everywhere"
SERVICE_CREATE_ZONE = "soundtouch_create_zone"
SERVICE_ADD_ZONE_SLAVE = "soundtouch_add_zone_slave"
SERVICE_REMOVE_ZONE_SLAVE = "soundtouch_remove_zone_slave"
_LOGGER = logging.getLogger(__name__)
MAP_STATUS = {
"PLAY_STATE": STATE_PLAYING,

View File

@ -0,0 +1,36 @@
play_everywhere:
description: Play on all Bose Soundtouch devices.
fields:
master:
description: Name of the master entity that will coordinate the grouping. Platform dependent. It is a shortcut for creating a multi-room zone with all devices
example: 'media_player.soundtouch_home'
create_zone:
description: Create a Sountouch multi-room zone.
fields:
master:
description: Name of the master entity that will coordinate the multi-room zone. Platform dependent.
example: 'media_player.soundtouch_home'
slaves:
description: Name of slaves entities to add to the new zone.
example: 'media_player.soundtouch_bedroom'
add_zone_slave:
description: Add a slave to a Sountouch multi-room zone.
fields:
master:
description: Name of the master entity that is coordinating the multi-room zone. Platform dependent.
example: 'media_player.soundtouch_home'
slaves:
description: Name of slaves entities to add to the existing zone.
example: 'media_player.soundtouch_bedroom'
remove_zone_slave:
description: Remove a slave from the Sounttouch multi-room zone.
fields:
master:
description: Name of the master entity that is coordinating the multi-room zone. Platform dependent.
example: 'media_player.soundtouch_home'
slaves:
description: Name of slaves entities to remove from the existing zone.
example: 'media_player.soundtouch_bedroom'