UPDATED: Lovelace Card and Package For Playing Media Library Items from Home Assistant UI #2990
Replies: 20 comments 41 replies
-
Love this! Can't get it to work though, haha Right now Can't figure it out. (Music Assistant is running fine) |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I still have two problems, one the volume does not increase or decrease when I pull the slider and the second every time I change the playlist, a radio station or any media the volume of the player I am playing comes to zero and I always have to go to the respective player and increase the volume because nothing is heard, please help me to solve these 2 problems if possible, thank you! |
Beta Was this translation helpful? Give feedback.
-
I recently detailed a solution that could make sharing this sort of card much easier. That comment can be found here. Additionally, I made a feature request on Home Assistant to make this all possible. If you think this feature would be helpful in sharing cards like this with the community, let me know. I am looking for a project to do over Christmas. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I am trying this, and 3 entities seem to be missing. Did I misspell something somewhere? |
Beta Was this translation helpful? Give feedback.
-
Hello, is it still working? I can't find any playlists, radio stations, artists...nothing...after the home assistant updates... |
Beta Was this translation helpful? Give feedback.
-
Need a little assistance here. I loaded the card using the package and all seems like it should work. The Media Type dropdown works and changes to artist, album, track, etc.; however, the second dropdown never returns any data, no matter what media type I choose. Not sure where I went wrong here. |
Beta Was this translation helpful? Give feedback.
-
I am getting the following errors:
Am I missing something? I have added the packages directory as Kind Regards, Gerrit |
Beta Was this translation helpful? Give feedback.
-
Have you given thought to a search capability within the lovelace card. For example, if you want to play a pop music playlist could you type that information somewhere. |
Beta Was this translation helpful? Give feedback.
-
Bravo |
Beta Was this translation helpful? Give feedback.
-
@jazzyisj Thank you for the package & card. I like the simple layout. Relatively new to HA and very new to MA but I think I have it all setup correctly but the Play Media (press) button does not seem to do anything. I can go to MA and I can select a player (using chromecast players) and an artist or album or track and it plays as anticipated. However, from the HA card the dropdowns work correctly but nothing happens when I press 'play media'. For example, I have a chromecast player in my home office and in MA it is named Office_Cast. I used the entity from Office_Cast which is media_player.office for #TODO. As noted, I do see anticipated values in the drop downs. In the beginning I think I had it confused as I had the HA integration for Google Cast and then the MA player Chromecast plus I had the MA player for HA so I had 2 of everything. At this point in time, I removed the HA Google Cast integration and have the MA Chromecast Player Provider. As I was writing this thought of a possible conflict, I am using Plex Server and I have Plex Server HA integration and I have MA Plex Server Provider. Could this be a conflict and should I only have Plex Server MA Provider and delete the HA integration? Otherwise, any thoughts / suggestions would be greatly appreciated. It feels like I am 1 yard from a goal line but cannot seem to find the missing link. Thanks in advance for any assistance you can provide. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the super fast response!
I am not sure if it was…
That I kicked it enough (haha)
Removed Plex Media Server integration from HA
Or, I gave it time to process after the restart (which I did many restarts today as I tried different scenarios)
I threw in the towel and did a HA restart and then went to cook dinner on the grill and while I was waiting for the grill to warm up, I gave it a try on my mobile and it worked!
BTW.. what I saw when I had the cast/chromecast in both HA and MA, I had to use the HA media player entity to get the dropdowns to work (#TODO) but no playback on any media player selected. That is why I removed the Google Cast from HA and only have Chromecast in MA for players. After I did he changes I do not believe the group created for the players was updating so I just added ‘1’ to the end of the name in the code and then the group looked correct. I used developer tools > actions to delete the old group since it would not delete thru the UI. I was not looking at the log (dumb me) but before I stopped for dinner I checked the log. I did see a message that the script (py) that was looking for a track (track was selected) and ‘track name’ could not be found. At this time the dropdowns look great (I changed the limits) and I have a list of cast players that I was planning on.
Again, Thank you for the code and the response!
I will continue to play!
Sorry for reaching out but like I said, I had thrown in the towel and was not sure what to try next.
|
Beta Was this translation helpful? Give feedback.
-
Spoke too soon…
Here is the log file error..
Logger: homeassistant.helpers.script.mass_play_media_press
Source: helpers/script.py:2067
First occurred: 7:01:18 PM (2 occurrences)
Last logged: 7:02:03 PM
* MASS Play Media press: Error executing script. Error for call_service at pos 4: Could not resolve ['Kid Charlemagne'] to playable media item
* MASS Play Media press: Already running
I believe the 2 times is because I tried 2 different players.
This is the same message I saw before but for a different selected track.
So.. maybe a timeout that is causing the script to stop and not find the file / track?
I just used pc browser (chrome) and found the track in MA and it played on the correct player.
Note: running HA Green and using win11 PC / Chrome browser with 2 android mobile phones.
From: jazzyisj ***@***.***>
Sent: Friday, May 16, 2025 7:01 PM
To: music-assistant/support ***@***.***>
Cc: SmileyRG ***@***.***>; Comment ***@***.***>
Subject: Re: [music-assistant/support] UPDATED: Lovelace Card and Package For Playing Media Library Items from Home Assistant UI (Discussion #2990)
No worries, glad you got it working.
—
Reply to this email directly, view it on GitHub <#2990 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/BFMQ2OG3HVO57AQTCV2BFFL26ZUZBAVCNFSM6AAAAABPD4E2LGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGMJXGYYDENY> .
You are receiving this because you commented. <https://github.com/notifications/beacon/BFMQ2OBQLB2BWOWGN2G2IJL26ZUZBA5CNFSM6AAAAABPD4E2LGWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAZEGNW.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
It has nothing to do with the media player. Read the error.
It looks like everything is working ok with this package but MA isn't able to resolve the media item. Have you tried different playlists, artists, tracks? Put this into dev tools - template and let me know what the result is.
|
Beta Was this translation helpful? Give feedback.
-
I think I found the issue. If I select music at the beginning of the 'type'
it works. Example, selected album AC/DC and it played. Also tried the one
Playlist with one song and it worked. I will need to build some Playlist
and use them vs artist/album/track.
…On Fri, May 16, 2025, 7:18 PM ***@***.***> wrote:
Spoke too soon…
Here is the log file error..
Logger: homeassistant.helpers.script.mass_play_media_press
Source: helpers/script.py:2067
First occurred: 7:01:18 PM (2 occurrences)
Last logged: 7:02:03 PM
- MASS Play Media press: Error executing script. Error for
call_service at pos 4: Could not resolve ['Kid Charlemagne'] to playable
media item
- MASS Play Media press: Already running
I believe the 2 times is because I tried 2 different players.
This is the same message I saw before but for a different selected track.
So.. maybe a timeout that is causing the script to stop and not find the
file / track?
I just used pc browser (chrome) and found the track in MA and it played on
the correct player.
Note: running HA Green and using win11 PC / Chrome browser with 2 android
mobile phones.
*From:* jazzyisj ***@***.***>
*Sent:* Friday, May 16, 2025 7:01 PM
*To:* music-assistant/support ***@***.***>
*Cc:* SmileyRG ***@***.***>; Comment <
***@***.***>
*Subject:* Re: [music-assistant/support] UPDATED: Lovelace Card and
Package For Playing Media Library Items from Home Assistant UI (Discussion
#2990)
No worries, glad you got it working.
—
Reply to this email directly, view it on GitHub
<#2990 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BFMQ2OG3HVO57AQTCV2BFFL26ZUZBAVCNFSM6AAAAABPD4E2LGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGMJXGYYDENY>
.
You are receiving this because you commented.Message ID: <
***@***.***
>
|
Beta Was this translation helpful? Give feedback.
-
Thanks again.
Please do not load as I am positive it is timeouts. I set favorites to
false and have 680 albums. I will set favorites to true and mark favorites
and reset the limits. I think it is still usable but I need to adjust
expectations. I really do appreciate your response and everything you have
done.
…On Fri, May 16, 2025, 8:26 PM jazzyisj ***@***.***> wrote:
The artist album track should work! If I get a chance later I'll reinstall
the package on my (I use a highly customized version) and see if there's an
issue somewhere, but a quick look at the code it looks ok. Keep in mind
it's designed to only work with items you have "favorited" in your MA
library. Also, make sure to click the "Update Media" button if you make any
changes to your MA library. (It will eventually update on its on though).
Also try radio mode - ie, select an artist and turn on radio mode. Also
make sure that you have enqueue mode set correctly. If you want something
to play right away it has to be Play or Replace otherwise you're just
adding your selection to the queue.
—
Reply to this email directly, view it on GitHub
<#2990 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BFMQ2OHK27FG627MDKHYYZD26Z65DAVCNFSM6AAAAABPD4E2LGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGMJXGYZDSMQ>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Hi, I just updated package and card. I am not getting anything in the artist or album filters although I do see both albums and tracks the dropdown. Is there something I need to configure? |
Beta Was this translation helpful? Give feedback.
-
Hello, after selecting the artist, album, radio... and pressing Play Media I get this error message: Has anyone had this same problem? |
Beta Was this translation helpful? Give feedback.
-
"In my own config I use multiple versions of these entities and lovelace card to create various "media presets" that can be recalled and played automatically in response to selected events (morning, sleep, arriving home etc.) or at the click of a button. If you're interested in how to accomplish this, just ask - I am happy to share." if you have where and if not could you thank you cant see it in the thread thank you |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Updated - 2025-5-22
I have created a package with all the of the entities necessary to select, save, and play your favourite Music Assistant media items from a card in the Home Assistant UI, and another file containing the YAML for the associated lovelace card. The only item to change to utilize this package in your HA config is to change the media player entity_id to any one of your Music Assistant media player entity_id's where indicated with the #TODO tag and add the lovelace card to your ui. The
music_assistant.get_library
action call parameters can be changed to suit your requirements.Play MASS Media - Package
Play MASS Media - Lovelace Card
In my own config I use multiple versions of these entities and lovelace card to create various "media presets" that can be recalled and played automatically in response to selected events (morning, sleep, arriving home etc.) or at the click of a button. If you're interested in how to accomplish this, just ask - I am happy to share.
Beta Was this translation helpful? Give feedback.
All reactions