diff --git a/homeassistant/components/media_player/services.yaml b/homeassistant/components/media_player/services.yaml index 5421085c308..92aafda81cb 100644 --- a/homeassistant/components/media_player/services.yaml +++ b/homeassistant/components/media_player/services.yaml @@ -107,20 +107,6 @@ media_seek: description: Position to seek to. The format is platform dependent. example: 100 -monoprice_snapshot: - description: Take a snapshot of the media player zone. - fields: - entity_id: - description: Name(s) of entities that will be snapshot. Platform dependent. - example: 'media_player.living_room' - -monoprice_restore: - description: Restore a snapshot of the media player zone. - fields: - entity_id: - description: Name(s) of entities that will be restored. Platform dependent. - example: 'media_player.living_room' - play_media: description: Send the media player the command for playing media. fields: diff --git a/homeassistant/components/monoprice/const.py b/homeassistant/components/monoprice/const.py new file mode 100644 index 00000000000..e8d813d2529 --- /dev/null +++ b/homeassistant/components/monoprice/const.py @@ -0,0 +1,5 @@ +"""Constants for the Monoprice 6-Zone Amplifier Media Player component.""" + +DOMAIN = "monoprice" +SERVICE_SNAPSHOT = "snapshot" +SERVICE_RESTORE = "restore" diff --git a/homeassistant/components/monoprice/media_player.py b/homeassistant/components/monoprice/media_player.py index 5f2af33e23a..1b1d9d2adf4 100644 --- a/homeassistant/components/monoprice/media_player.py +++ b/homeassistant/components/monoprice/media_player.py @@ -5,7 +5,6 @@ import voluptuous as vol from homeassistant.components.media_player import MediaPlayerDevice, PLATFORM_SCHEMA from homeassistant.components.media_player.const import ( - DOMAIN, SUPPORT_SELECT_SOURCE, SUPPORT_TURN_OFF, SUPPORT_TURN_ON, @@ -21,6 +20,7 @@ from homeassistant.const import ( STATE_ON, ) import homeassistant.helpers.config_validation as cv +from .const import DOMAIN, SERVICE_RESTORE, SERVICE_SNAPSHOT _LOGGER = logging.getLogger(__name__) @@ -42,9 +42,6 @@ CONF_SOURCES = "sources" DATA_MONOPRICE = "monoprice" -SERVICE_SNAPSHOT = "snapshot" -SERVICE_RESTORE = "restore" - # Valid zone ids: 11-16 or 21-26 or 31-36 ZONE_IDS = vol.All( vol.Coerce(int), diff --git a/homeassistant/components/monoprice/services.yaml b/homeassistant/components/monoprice/services.yaml index e69de29bb2d..420270e10ac 100644 --- a/homeassistant/components/monoprice/services.yaml +++ b/homeassistant/components/monoprice/services.yaml @@ -0,0 +1,13 @@ +snapshot: + description: Take a snapshot of the media player zone. + fields: + entity_id: + description: Name(s) of entities that will be snapshot. Platform dependent. + example: 'media_player.living_room' + +restore: + description: Restore a snapshot of the media player zone. + fields: + entity_id: + description: Name(s) of entities that will be restored. Platform dependent. + example: 'media_player.living_room' diff --git a/tests/components/monoprice/test_media_player.py b/tests/components/monoprice/test_media_player.py index 36110e6d909..a33b8553908 100644 --- a/tests/components/monoprice/test_media_player.py +++ b/tests/components/monoprice/test_media_player.py @@ -5,7 +5,6 @@ import voluptuous as vol from collections import defaultdict from homeassistant.components.media_player.const import ( - DOMAIN, SUPPORT_TURN_ON, SUPPORT_TURN_OFF, SUPPORT_VOLUME_MUTE, @@ -19,10 +18,13 @@ import tests.common from homeassistant.components.monoprice.media_player import ( DATA_MONOPRICE, PLATFORM_SCHEMA, - SERVICE_SNAPSHOT, - SERVICE_RESTORE, setup_platform, ) +from homeassistant.components.monoprice.const import ( + DOMAIN, + SERVICE_RESTORE, + SERVICE_SNAPSHOT, +) import pytest