Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update service domain for squeezebox from 'media_player' to 'squeezebox' #29141

Merged
merged 1 commit into from
Nov 27, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ omit =
homeassistant/components/spider/*
homeassistant/components/spotcrime/sensor.py
homeassistant/components/spotify/media_player.py
homeassistant/components/squeezebox/media_player.py
homeassistant/components/squeezebox/*
homeassistant/components/starline/*
homeassistant/components/starlingbank/sensor.py
homeassistant/components/steam_online/sensor.py
Expand Down
13 changes: 0 additions & 13 deletions homeassistant/components/media_player/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,19 +218,6 @@ soundtouch_remove_zone_slave:
description: Name of slaves entities to remove from the existing zone.
example: 'media_player.soundtouch_bedroom'

squeezebox_call_method:
description: 'Call a Squeezebox JSON/RPC API method.'
fields:
entity_id:
description: Name(s) of the Squeexebox entities where to run the API method.
example: 'media_player.squeezebox_radio'
command:
description: Name of the Squeezebox command.
example: 'playlist'
parameters:
description: Optional array of parameters to be appended to the command. See 'Command Line Interface' official help page from Logitech for details.
example: '["loadtracks", "track.titlesearch=highway to hell"]'

yamaha_enable_output:
description: Enable or disable an output port
fields:
Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/squeezebox/const.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""Constants for the Squeezebox component."""
DOMAIN = "squeezebox"
SERVICE_CALL_METHOD = "call_method"
5 changes: 2 additions & 3 deletions homeassistant/components/squeezebox/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player.const import (
ATTR_MEDIA_ENQUEUE,
DOMAIN,
MEDIA_TYPE_MUSIC,
SUPPORT_CLEAR_PLAYLIST,
SUPPORT_NEXT_TRACK,
Expand Down Expand Up @@ -44,6 +43,8 @@
from homeassistant.exceptions import PlatformNotReady
from homeassistant.util.dt import utcnow

from .const import DOMAIN, SERVICE_CALL_METHOD

_LOGGER = logging.getLogger(__name__)

DEFAULT_PORT = 9000
Expand Down Expand Up @@ -75,8 +76,6 @@
}
)

SERVICE_CALL_METHOD = "squeezebox_call_method"

DATA_SQUEEZEBOX = "squeezebox"

KNOWN_SERVERS = "squeezebox_known_servers"
Expand Down
3 changes: 1 addition & 2 deletions homeassistant/components/squeezebox/services.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
squeezebox_call_method:
call_method:
description: Call a custom Squeezebox JSONRPC API.
fields:
entity_id:
Expand All @@ -10,4 +10,3 @@ squeezebox_call_method:
parameters:
description: Array of additional parameters to pass to Logitech Media Server (p1, ..., pN in the CLI documentation).
example: ["loadtracks", "album.titlesearch="]