diff --git a/homeassistant/components/soundtouch/const.py b/homeassistant/components/soundtouch/const.py new file mode 100644 index 00000000000..37bf1d8cc2b --- /dev/null +++ b/homeassistant/components/soundtouch/const.py @@ -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" diff --git a/homeassistant/components/soundtouch/media_player.py b/homeassistant/components/soundtouch/media_player.py index f613ba22dfa..a9f6e05011f 100644 --- a/homeassistant/components/soundtouch/media_player.py +++ b/homeassistant/components/soundtouch/media_player.py @@ -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, diff --git a/homeassistant/components/soundtouch/services.yaml b/homeassistant/components/soundtouch/services.yaml index e69de29bb2d..fd848b76b2d 100644 --- a/homeassistant/components/soundtouch/services.yaml +++ b/homeassistant/components/soundtouch/services.yaml @@ -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'