Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions homeassistant/components/media_player/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions homeassistant/components/monoprice/const.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""Constants for the Monoprice 6-Zone Amplifier Media Player component."""

DOMAIN = "monoprice"
SERVICE_SNAPSHOT = "snapshot"
SERVICE_RESTORE = "restore"
5 changes: 1 addition & 4 deletions homeassistant/components/monoprice/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

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,
Expand All @@ -21,6 +20,7 @@
STATE_ON,
)
import homeassistant.helpers.config_validation as cv
from .const import DOMAIN, SERVICE_RESTORE, SERVICE_SNAPSHOT

_LOGGER = logging.getLogger(__name__)

Expand All @@ -42,9 +42,6 @@

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),
Expand Down
13 changes: 13 additions & 0 deletions homeassistant/components/monoprice/services.yaml
Original file line number Diff line number Diff line change
@@ -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'
8 changes: 5 additions & 3 deletions tests/components/monoprice/test_media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from collections import defaultdict
from homeassistant.components.media_player.const import (
DOMAIN,
SUPPORT_TURN_ON,
SUPPORT_TURN_OFF,
SUPPORT_VOLUME_MUTE,
Expand All @@ -19,10 +18,13 @@
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


Expand Down