punxaphil / maxi-media-player

Media card for Home Assistant UI with a focus on managing multiple media players, but not excluding single player setups.
7 stars 1 forks source link

Join Linkplay error #48

Closed kyme32 closed 3 weeks ago

kyme32 commented 3 weeks ago

Hello,

I have the following setup and when i try to join players it trows an error, unjoining them works flawless. Calling manually service: linkplay.join to join the players works with no problem

I've created also https://github.com/home-assistant/core/issues/119435 Perhaps it would be grate to have a possibility to change the callservice for joining and use linkplay service

Core 2024.6.2
Supervisor 2024.06.0
Operating System 12.3
Frontend 20240610.0

Linkplay component V.3.2.1 by nagyrobi Maxi Media Player component v.1.6.0

Failed to call service media_player/join. LinkPlayDevice.async_join_players() got an unexpected keyword argument 'group_members'

System Log

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:241
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 12:08:41 AM (1 occurrences)
Last logged: 12:08:41 AM

[139670286488128] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 977, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1041, in _handle_entity_call
    task = hass.async_run_hass_job(job)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 939, in async_run_hass_job
    return self._async_add_hass_job(hassjob, *args, background=background)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 749, in _async_add_hass_job
    hassjob.target(*args), name=hassjob.name, loop=self.loop
    ^^^^^^^^^^^^^^^^^^^^^
TypeError: LinkPlayDevice.async_join_players() got an unexpected keyword argument 'group_members'

UI yaml

type: custom:maxi-media-player
sections:
  - volumes
  - media browser
  - grouping
  - player
entities:
  - media_player.audiocast_tv
  - media_player.large_left
  - media_player.large_right
  - media_player.small_dorm
predefinedGroups:
  - name: All
    entities:
      - player: media_player.audiocast_tv
        volume: 0
      - player: media_player.large_left
        volume: 0
      - player: media_player.large_right
        volume: 0
      - player: media_player.small_dorm
        volume: 0
  - name: Living
    media: ''
    entities:
      - player: media_player.audiocast_tv
        volume: 0
      - player: media_player.large_left
        volume: 0
      - player: media_player.large_right
        volume: 0
showVolumeUpAndDownButtons: false
hidePlayerControlPowerButton: false
punxaphil commented 3 weeks ago

What command and arguments do you use for manually joining?

kyme32 commented 3 weeks ago

Hello, Using linkplay component i use the following service call to join

service: linkplay.join
data:
  master: media_player.audiocast_tv \\master speaker
  entity_id: media_player.large_left,media_player.large_right  \\slave speakers, comma separated

to unjoin

service: linkplay.unjoin
data:
  entity_id: media_player.large_right

Thank you

punxaphil commented 3 weeks ago

Linkplay must support the official media player join. So it is probably a bug with linkplay. It says it does:

It's also possible to use Home Assistant's standard multiroom join and unjoin functions for multiroom control.

But your error indicates it doesnt. You should probably file the bug on linkplay integration instead.