Thanks for your quick response, but this also happens if I open the media browser and just click on any arbitrary mp3 file to be played. I am not explicitly setting the media type myself. The log suggests that the type is set as part of the downstream functionality of HA core…
Maybe important to mention that it does not happen if I set as playback device the webbrowser. So this may be related to my media_player entity of my TV being broken?
Indeed this only happens with the music assistant media player entities. I can see in the MASS logs:
2025-03-08 20:40:57.018 ERROR (MainThread) [music_assistant] Error doing task: Task exception was never retrieved
Traceback (most recent call last):
File "/app/venv/lib/python3.12/site-packages/music_assistant/controllers/players.py", line 101, in wrapper
await func(self, *args, **kwargs)
File "/app/venv/lib/python3.12/site-packages/music_assistant/controllers/players.py", line 712, in play_media
await player_prov.play_media(
File "/app/venv/lib/python3.12/site-packages/music_assistant/providers/hass_players/__init__.py", line 316, in play_media
await self.hass_prov.hass.call_service(
File "/app/venv/lib/python3.12/site-packages/hass_client/client.py", line 184, in call_service
return await self.send_command("call_service", **params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.12/site-packages/hass_client/client.py", line 225, in send_command
return await future
^^^^^^^^^^^^
hass_client.exceptions.FailedCommand: Invalid media type: music
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/venv/lib/python3.12/site-packages/music_assistant/controllers/player_queues.py", line 814, in play_media
await self.mass.players.play_media(
File "/app/venv/lib/python3.12/site-packages/music_assistant/controllers/players.py", line 103, in wrapper
raise PlayerCommandFailed(str(err)) from err
music_assistant_models.errors.PlayerCommandFailed: Invalid media type: music