Music Assistant Queue Card - Control your player's queue from your dashboard!

Hi!

I would like to share with you a little card I’ve been slowly working on over the past couple months.

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

The card is very simple - if a player is active, it will pull the queue items and display it like below. It should always pull the current actively played item, the <5 items before it, and <100 items after. If the player isn’t active, it will hide itself. The queue also has a dropdown handle so it isn’t always wasting space on your screen.

IMPORTANT: This card relies upon another custom integration I created: droans/mass_queue. The Music Assistant integration is currently limited on what you can do and doesn’t support altering the player queues.

Currently, you can only play and remove items. In the future, I plan to also add the ability to move items up/down/next.

Installation and configuration instructions are in the Readme file. I’ll be happy to answer any other questions that you have.

I am rather new at JS coding. I am more than happy to accept contributions I’ve tried to optimize this to the best of my abilities but I’m sure there are still improvements to be made :slight_smile:

5 Likes

I will try this tomorrow, as I’m looking for a way to control the audio from Music Assistant without having to open the side bar.

Very Nice!

I would appreciate having an option to set whether to display the list expanded or collapsed and an option to edit the title.

Thanks :slight_smile:

Just added those two features :wink:

1 Like

Just added more action buttons with v0.5.0! You can now move queue items up, down, and next.

2 Likes

Hey so im trying to use your card but in my case its just empty.
No matter which music assistant media player i use…

Did you install the Music Assistant Queue Actions integration from HACS?

Yes i have.

Check the logs for your browser.

Run mass_queue.get_queue_items from the Developer Tools and see what the output is. If the output is empty, run music_assistant.get_queue and see what its output is. The integration uses the MusicAssistantClient object from your Music Assistant integration to ensure the correct MAss instance is being used, limit the number of active connections, and prevent any communication issues. If it does not report properly, that suggests the issue is with your installation or you do not have anything playing currently.

I’m having trouble adding the card to my dashboard. No matter if I try to add the card directly or use a manual card and paste the code there… My browser hangs and after some time I get asked by my browser if I want to continue waiting or leave the page :frowning:
The actions in Developer Tools are working correctly.

1 Like

I just released an update for the actions to fix an issue if there was nothing playing. Try that and see if it fixes your issue.

Beyond that, I would need to see logs from your browser.

Hey, it’s me again.
I got the card working, but a few days ago the integration just disappeared from my integrations page.
When I try to add it again, it says it’s already set up.
I tried reinstalling, but the same problem persists.

Is there anything in your logs?

Got everything setup but my queue is blank. Using the MA Sonos integration. Have a queue playing with correct entity chosen. Player works and will play the queue but the queue list is blank in the player and the queue card. Everything else works perfectly. Any suggestions. I’ve uninstalled and reinstalled. And tried MA current release and beta. No go.

MA plays and shows full queue. Confirmed queue is attached to the player entity I’m using. JS files are showing in resources.

Any suggestions?

Edit: mass get player queue in Dev tools give this error. Failed to perform the action mass_queue.get_queue_items. Unknown error

The most likely reason is due to an incorrect card config. Ensure you aren’t using a list for entity but instead just a single player.

This card is also in maintenance mode and will receive few (if any) future updates. I would recommend checking out my other card, mass-player-card.

I just double checked that I have only one entity, (Master Bedroom Sonos) queue toggled and blank for before and after (have also tried 5, 25)

I have tried using both the player card queue and queue card. Same results. :man_shrugging:

Just ran the mass get queue in Dev tools. Error: Failed to perform the action mass_queue.get_queue_items. Unknown error

However, if I run mass.Get.player.queue.details, it does show the queue.

Edit: moving over to player card topic.