mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Squeezebox remove deprecated sync and unsync services (#125271)
* Squeezebox remove deprecated sync and unsync * Squeezebox remove sync group attribute
This commit is contained in:
parent
baa9473383
commit
505df84783
@ -56,11 +56,8 @@ from .const import DISCOVERY_TASK, DOMAIN, KNOWN_PLAYERS, SQUEEZEBOX_SOURCE_STRI
|
|||||||
|
|
||||||
SERVICE_CALL_METHOD = "call_method"
|
SERVICE_CALL_METHOD = "call_method"
|
||||||
SERVICE_CALL_QUERY = "call_query"
|
SERVICE_CALL_QUERY = "call_query"
|
||||||
SERVICE_SYNC = "sync"
|
|
||||||
SERVICE_UNSYNC = "unsync"
|
|
||||||
|
|
||||||
ATTR_QUERY_RESULT = "query_result"
|
ATTR_QUERY_RESULT = "query_result"
|
||||||
ATTR_SYNC_GROUP = "sync_group"
|
|
||||||
|
|
||||||
SIGNAL_PLAYER_REDISCOVERED = "squeezebox_player_rediscovered"
|
SIGNAL_PLAYER_REDISCOVERED = "squeezebox_player_rediscovered"
|
||||||
|
|
||||||
@ -75,7 +72,6 @@ ATTR_OTHER_PLAYER = "other_player"
|
|||||||
|
|
||||||
ATTR_TO_PROPERTY = [
|
ATTR_TO_PROPERTY = [
|
||||||
ATTR_QUERY_RESULT,
|
ATTR_QUERY_RESULT,
|
||||||
ATTR_SYNC_GROUP,
|
|
||||||
]
|
]
|
||||||
|
|
||||||
SQUEEZEBOX_MODE = {
|
SQUEEZEBOX_MODE = {
|
||||||
@ -181,12 +177,6 @@ async def async_setup_entry(
|
|||||||
},
|
},
|
||||||
"async_call_query",
|
"async_call_query",
|
||||||
)
|
)
|
||||||
platform.async_register_entity_service(
|
|
||||||
SERVICE_SYNC,
|
|
||||||
{vol.Required(ATTR_OTHER_PLAYER): cv.string},
|
|
||||||
"async_sync",
|
|
||||||
)
|
|
||||||
platform.async_register_entity_service(SERVICE_UNSYNC, None, "async_unsync")
|
|
||||||
|
|
||||||
# Start server discovery task if not already running
|
# Start server discovery task if not already running
|
||||||
entry.async_on_unload(async_at_start(hass, start_server_discovery))
|
entry.async_on_unload(async_at_start(hass, start_server_discovery))
|
||||||
@ -566,26 +556,10 @@ class SqueezeBoxEntity(MediaPlayerEntity):
|
|||||||
"Could not find player_id for %s. Not syncing", other_player
|
"Could not find player_id for %s. Not syncing", other_player
|
||||||
)
|
)
|
||||||
|
|
||||||
async def async_sync(self, other_player: str) -> None:
|
|
||||||
"""Sync this Squeezebox player to another. Deprecated."""
|
|
||||||
_LOGGER.warning(
|
|
||||||
"Service squeezebox.sync is deprecated; use media_player.join_players"
|
|
||||||
" instead"
|
|
||||||
)
|
|
||||||
await self.async_join_players([other_player])
|
|
||||||
|
|
||||||
async def async_unjoin_player(self) -> None:
|
async def async_unjoin_player(self) -> None:
|
||||||
"""Unsync this Squeezebox player."""
|
"""Unsync this Squeezebox player."""
|
||||||
await self._player.async_unsync()
|
await self._player.async_unsync()
|
||||||
|
|
||||||
async def async_unsync(self) -> None:
|
|
||||||
"""Unsync this Squeezebox player. Deprecated."""
|
|
||||||
_LOGGER.warning(
|
|
||||||
"Service squeezebox.unsync is deprecated; use media_player.unjoin_player"
|
|
||||||
" instead"
|
|
||||||
)
|
|
||||||
await self.async_unjoin_player()
|
|
||||||
|
|
||||||
async def async_browse_media(
|
async def async_browse_media(
|
||||||
self,
|
self,
|
||||||
media_content_type: MediaType | str | None = None,
|
media_content_type: MediaType | str | None = None,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user