Custom Lovelace UI #2601
Replies: 53 comments 225 replies
-
This looks absolutely gorgeous - both functionally and esthetically ! |
Beta Was this translation helpful? Give feedback.
-
Wow, that looks really great!! |
Beta Was this translation helpful? Give feedback.
-
I would be interested in seeing the YAML. I am specifically looking for a way to integrate the Search function of MA into my Lovelace Dashboard but am having trouble. Looks like you figured it out. |
Beta Was this translation helpful? Give feedback.
-
As far as interest goes you have my Bow AND my Sword |
Beta Was this translation helpful? Give feedback.
-
Yes Please 🤩 i’d love seing this into the dashboard |
Beta Was this translation helpful? Give feedback.
-
I would also love the YAML for this. |
Beta Was this translation helpful? Give feedback.
-
Chiming in to add that I'd greatly appreciate the YAML code for this. Awesome work! btw, @rxritalin, the link in your OP points to https://github.com/orgs/music-assistant/discussions/url instead of to https://github.com/orgs/music-assistant/discussions/2586. You should also just be able to tag the discussion directly via #2586 |
Beta Was this translation helpful? Give feedback.
-
I would love to see the YAML for this. I'm currently redoing my dashboards using ui-lovelace-minimalist, so now would be a perfect time to integrate a nice dashboard for mass instead of using the sonos card I am using for my kid's rooms. Installed mass yesterday and it finally finished syncing my PLEX server this afternoon (lots of tracks with quite a few more CDs to finish ripping). |
Beta Was this translation helpful? Give feedback.
-
@thewolfman56 @Paul-Vdp @wambs @chriss10an Im about 95% done, just have a few layout quirks I need to deal with. |
Beta Was this translation helpful? Give feedback.
-
I would also love to see the code behind this. Thanks so much for all your efforts! |
Beta Was this translation helpful? Give feedback.
-
Gorgeous! |
Beta Was this translation helpful? Give feedback.
-
Yup, like everyone else, I want/need this in my house. UI is where everything get a bit down I would say and this bring the professional uix touch. I wouldn't mind seeing the rest of your dashboard :) |
Beta Was this translation helpful? Give feedback.
-
@rxritalin any updates? Would love to get this implemented! Great work! |
Beta Was this translation helpful? Give feedback.
-
@rxritalin , I would echo the comments here. Gorgeous! I'd also be very interested in the underlying YAML if you would consider sharing. Thank you in advance! |
Beta Was this translation helpful? Give feedback.
-
Beautiful work. Would love to see the YAML / Help with the project. |
Beta Was this translation helpful? Give feedback.
-
I am going to take a look into the Decluttering Card module over Christmas break. If anyone has any other suggestions, for adding variables please let me know. @OzGav Does the Floorplan card have some of this built in? Having a look over your files, its seems to? |
Beta Was this translation helpful? Give feedback.
-
@rxritalin It just occurred to me, what version of Home Assistant are you using? I'm running 2024.12.3 Core, 2024.11.4 Supervisor, and 13 HAOS. I'm wondering what impact this could be having on us. Thanks! |
Beta Was this translation helpful? Give feedback.
-
just want to thank you for this. It was easy for me to setup because i already had all the cards. as for the coverart not re-displaying i just added a new menu option for now. also noted you have CoverArt in the yaml and Coverart in the input_select |
Beta Was this translation helpful? Give feedback.
-
Had a little breakthrough for me in regards to the Cover Art! All I did was simply create an automation to switch the Input_Select to Cover Art when the Menu is set to off. In case there are any future code updates by @rxritalin I think I'll keep the automation separate from the dashboard code but I'm happy to have realized a simple fix! Now onto tweaking the rest! alias: RX Stereo Set Cover Art
updated12-16.mp4 |
Beta Was this translation helpful? Give feedback.
-
Any plans for a mobile friendly version? I use custom Sonos card which is nice too
…On Dec 16, 2024, 5:13 PM, at 5:13 PM, rxritalin ***@***.***> wrote:
> yes i was thinking that too, but i still want to have menu on and
coverart. im thinking about using a toggle approach where a subsequent
click on active section will bring up the coverart
The automation is required, but I totally forgot about it. I have
updated my repo.
Since the whole UI is based on the Picture Elements card, everything
acts as a layer. So my plan was to have a small button that would be
visible over the top of the iFrame cards, but only if the menu was
open. This button would show/hide the cover-art with the menu still
open.
Likewise the button would be visible over the cover-art, but only if
the "input_select.rx_stereo_menu" was on.
--
Reply to this email directly or view it on GitHub:
#2601 (reply in thread)
You are receiving this because you commented.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I'm not sure if this would interest anyone here but in case it does, I managed to figure out how to show the last playing song including artwork in the player also. Here's how I got it to work:
Then I created automations to make it all work. Here is the sensors I created in my config file:
And here is the yaml for the automations:
Then using the sensor data, you would enter that into your media card - which ever one you use. Here's my yaml portions I used for my media card:
|
Beta Was this translation helpful? Give feedback.
-
Nice work. Next song would be more useful
…On Dec 20, 2024, 12:46 PM, at 12:46 PM, Colton YYZ ***@***.***> wrote:
I'm not sure if this would interest anyone here but in case it does, I
managed to figure out how to show the last playing song including
artwork in the player also. Here's how I got it to work:
- I created sensors to read the current song, current artist, and
current artwork.
- I then created text input helpers for each of them.
- I then created text input helpers for "previous artitst", "previous
song", and "previous artwork"
- I created text input helpers called "previous artist storage",
"previous song storage" and "previous artwork storage".
Then I created automations to make it all work. Here is the sensors I
created in my config file:
```
- platform: template
sensors:
active_media_player:
value_template: >
{% for entity_id in state_attr('group.all_media_players', 'entity_id')
%}
{% if states(entity_id) == 'playing' %}
{{ entity_id }}
{% endif %}
{% endfor %}
attribute_templates:
media_title: >
{% for entity_id in state_attr('group.all_media_players', 'entity_id')
%}
{% if states(entity_id) == 'playing' %}
{{ state_attr(entity_id, 'media_title') }}
{% endif %}
{% endfor %}
media_artist: >
{% for entity_id in state_attr('group.all_media_players', 'entity_id')
%}
{% if states(entity_id) == 'playing' %}
{{ state_attr(entity_id, 'media_artist') }}
{% endif %}
{% endfor %}
- platform: template
sensors:
current_title_playing:
friendly_name: "Current Song Playing"
value_template: >
{{ state_attr('sensor.active_media_player', 'media_title') }}
- platform: template
sensors:
current_artist_playing:
friendly_name: "Current Artist Playing"
value_template: >
{{ state_attr('sensor.active_media_player', 'media_artist') }}
- platform: template
sensors:
current_artwork_playing:
friendly_name: "Current Artwork Playing"
value_template: >
{{ state_attr('sensor.active_media_player', 'entity_picture') }}
- platform: template
sensors:
previous_artwork_played:
friendly_name: "Previous Artwork Played"
value_template: >
{{ states('input_text.previous_artwork') }}
```
And here is the yaml for the automations:
```
- id: '1734404937564'
alias: Update Previous Song
description: ''
triggers:
- trigger: state
entity_id:
- media_player.colton_s_echo_show
attribute: media_title
actions:
- data:
entity_id: input_text.previous_song
value: '{{ states(''input_text.previous_song_storage'') }}'
action: input_text.set_value
- data:
entity_id: input_text.previous_song_storage
value: '{{ states(''sensor.current_title_playing'') }}'
action: input_text.set_value
- id: '1734418970406'
alias: Update Previous Artist Playing
description: ''
triggers:
- trigger: state
entity_id:
- media_player.colton_s_echo_show
attribute: media_artist
conditions: []
actions:
- data:
entity_id: input_text.previous_artist
value: '{{ states(''input_text.previous_artist_storage'') }}'
action: input_text.set_value
- data:
entity_id: input_text.previous_artist_storage
value: '{{ states(''sensor.current_artist_playing'') }}'
action: input_text.set_value
mode: single
- id: '1734558768034'
alias: Update Previous Artwork Playing
description: ''
triggers:
- entity_id: media_player.colton_s_echo_show
attribute: entity_picture
trigger: state
conditions: []
actions:
- target:
entity_id: input_text.previous_artwork
data:
value: '{{ states(''input_text.previous_artwork_storage'') }}'
action: input_text.set_value
- target:
entity_id: input_text.previous_artwork_storage
data:
value: '{{ state_attr(''media_player.colton_s_echo_show'',
''entity_picture'')
}}'
action: input_text.set_value
mode: single
```
Then using the sensor data, you would enter that into your media card -
which ever one you use.
Here's my yaml portions I used for my media card:
```
- type: custom:config-template-card
entities:
- sensor.previous_artwork_played
card:
type: picture
image: ${states['sensor.previous_artwork_played'].state}
style:
top: 59%
height: 7%
width: 7%
left: 44%
card_mod:
style:
ha-card: |
div.mmp__bg {
border-radius: 24px;
}
########################################################
- type: custom:mushroom-template-card
primary: ""
secondary: >-
Previous Song - {{ states('input_text.previous_song_storage') }} by {{
states('input_text.previous_artist_storage') }}
icon: ""
entity: media_player.colton_s_echo_show
fill_container: true
layout: horizontal
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
card_mod:
style: |
:host {
{% if is_state("input_boolean.rx_stereo_menu", "off") %}
left: 70%;
width: 50%;
{% else %}
left: 65%;
width: 50%;
{% endif %}
}
ha-card {
--card-primary-font-size: 20px;
--card-secondary-font-size: 20px;
--card-primary-line-height: 24px;
--card-secondary-line-height: 24px;
--card-primary-color: #ffffffba;
--card-secondary-color: #ffffffba;
border: none !important;
box-shadow: none;
background: none !important;
font-family: "Arial Black", "Helvetica";
text-shadow:1px 1px 10px #3, 1px 1px 10px #3;
padding: 0px !important;
}
.content {
display: inline-block !important;
background: none !important;
padding: 10px;
}
style:
top: 74%
height: 32px
```
![Screenshot 2024-12-20
152859](https://github.com/user-attachments/assets/a419be7e-3d7e-4229-b235-cdc21d9c72ad)
--
Reply to this email directly or view it on GitHub:
#2601 (comment)
You are receiving this because you commented.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Original artwork |
Beta Was this translation helpful? Give feedback.
-
Yeah they Spotify and Sonos I can do or get just about anything but I'm trying to use mass more. I really like the random 500 playlist because it doesn't use Spotify's bogus algorithm
…On Dec 23, 2024, 4:41 PM, at 4:41 PM, Colton YYZ ***@***.***> wrote:
@Vansmak, so I was able to get TONS of entities with Spotifyplus using
this in Developer tools, Actions. See below.
```
action: spotifyplus.get_player_queue_info
data:
entity_id: media_player.spotifyplus_colton
```
The queue is shown in the results. But **how can I create a sensor
extracting the next track?**
Here's a sample of what is shows in the results which shows track 2
(the next song to be played - track 1 is the current song playing -
track 3 is the 2nd song coming up, etc. I listened to them and verified
the sequence. The entity "track_number: X" is how you can quickly skip
a ton of code and find the next track - X being the track number of
course)
The entities I would like to create sensors for are:
```
image_url: (this is the artwork)
name: (this is song name)
artists:
name: Beyoncé
```
Here's one complete section of code for 1 song (I removed the mile long
list of countries to keep this short):
```
- album:
album_type: album
artists:
- external_urls:
spotify: https://open.spotify.com/artist/6vWDO969PvNqNYHIOW5v0m
href: https://api.spotify.com/v1/artists/6vWDO969PvNqNYHIOW5v0m
id: 6vWDO969PvNqNYHIOW5v0m
name: Beyoncé
type: artist
uri: spotify:artist:6vWDO969PvNqNYHIOW5v0m
available_markets:
copyrights: []
external_ids: {}
external_urls:
spotify: https://open.spotify.com/album/39P7VD7qlg3Z0ltq60eHp7
genres: []
href: https://api.spotify.com/v1/albums/39P7VD7qlg3Z0ltq60eHp7
id: 39P7VD7qlg3Z0ltq60eHp7
image_url:
https://i.scdn.co/image/ab67616d0000b273801c4d205accdba0a468a10b
images:
- url: https://i.scdn.co/image/ab67616d0000b273801c4d205accdba0a468a10b
height: 640
width: 640
- url: https://i.scdn.co/image/ab67616d00001e02801c4d205accdba0a468a10b
height: 300
width: 300
- url: https://i.scdn.co/image/ab67616d00004851801c4d205accdba0a468a10b
height: 64
width: 64
label: null
name: I AM...SASHA FIERCE
popularity: null
release_date: "2008-11-17"
release_date_precision: day
restrictions: {}
total_tracks: 11
type: album
uri: spotify:album:39P7VD7qlg3Z0ltq60eHp7
artists:
- external_urls:
spotify: https://open.spotify.com/artist/6vWDO969PvNqNYHIOW5v0m
href: https://api.spotify.com/v1/artists/6vWDO969PvNqNYHIOW5v0m
id: 6vWDO969PvNqNYHIOW5v0m
name: Beyoncé
type: artist
uri: spotify:artist:6vWDO969PvNqNYHIOW5v0m
available_markets:
disc_number: 1
duration_ms: 261640
explicit: false
external_ids:
ean: null
isrc: USSM10804556
upc: null
external_urls:
spotify: https://open.spotify.com/track/4JehYebiI9JE8sR8MisGVb
href: https://api.spotify.com/v1/tracks/4JehYebiI9JE8sR8MisGVb
id: 4JehYebiI9JE8sR8MisGVb
image_url:
https://i.scdn.co/image/ab67616d0000b273801c4d205accdba0a468a10b
is_local: false
is_playable: null
name: Halo
popularity: 71
preview_url: null
restrictions: {}
track_number: 2
type: track
uri: spotify:track:4JehYebiI9JE8sR8MisGVb
```
--
Reply to this email directly or view it on GitHub:
#2601 (reply in thread)
You are receiving this because you were mentioned.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
They are though, because it shows on the queue view within mass player section.
…On Dec 23, 2024, 5:44 PM, at 5:44 PM, Colton YYZ ***@***.***> wrote:
@Vansmak, As would I because it's only 1 portion of code verses
creating code for all the streaming sites. I just don't know how MASS
can pull the queue data regardless of the music source.
For now though, would you know how to create the 3 sensors for Spotify?
I would be grateful if you know how. And maybe someone else better at
MASS could advise me how to do it at that level instead of individual
provider levels.
--
Reply to this email directly or view it on GitHub:
#2601 (reply in thread)
You are receiving this because you were mentioned.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Check this out hokiebrian/spotify_plus#1 (comment)
…On Dec 23, 2024, 4:41 PM, at 4:41 PM, Colton YYZ ***@***.***> wrote:
@Vansmak, so I was able to get TONS of entities with Spotifyplus using
this in Developer tools, Actions. See below.
```
action: spotifyplus.get_player_queue_info
data:
entity_id: media_player.spotifyplus_colton
```
The queue is shown in the results. But **how can I create a sensor
extracting the next track?**
Here's a sample of what is shows in the results which shows track 2
(the next song to be played - track 1 is the current song playing -
track 3 is the 2nd song coming up, etc. I listened to them and verified
the sequence. The entity "track_number: X" is how you can quickly skip
a ton of code and find the next track - X being the track number of
course)
The entities I would like to create sensors for are:
```
image_url: (this is the artwork)
name: (this is song name)
artists:
name: Beyoncé
```
Here's one complete section of code for 1 song (I removed the mile long
list of countries to keep this short):
```
- album:
album_type: album
artists:
- external_urls:
spotify: https://open.spotify.com/artist/6vWDO969PvNqNYHIOW5v0m
href: https://api.spotify.com/v1/artists/6vWDO969PvNqNYHIOW5v0m
id: 6vWDO969PvNqNYHIOW5v0m
name: Beyoncé
type: artist
uri: spotify:artist:6vWDO969PvNqNYHIOW5v0m
available_markets:
copyrights: []
external_ids: {}
external_urls:
spotify: https://open.spotify.com/album/39P7VD7qlg3Z0ltq60eHp7
genres: []
href: https://api.spotify.com/v1/albums/39P7VD7qlg3Z0ltq60eHp7
id: 39P7VD7qlg3Z0ltq60eHp7
image_url:
https://i.scdn.co/image/ab67616d0000b273801c4d205accdba0a468a10b
images:
- url: https://i.scdn.co/image/ab67616d0000b273801c4d205accdba0a468a10b
height: 640
width: 640
- url: https://i.scdn.co/image/ab67616d00001e02801c4d205accdba0a468a10b
height: 300
width: 300
- url: https://i.scdn.co/image/ab67616d00004851801c4d205accdba0a468a10b
height: 64
width: 64
label: null
name: I AM...SASHA FIERCE
popularity: null
release_date: "2008-11-17"
release_date_precision: day
restrictions: {}
total_tracks: 11
type: album
uri: spotify:album:39P7VD7qlg3Z0ltq60eHp7
artists:
- external_urls:
spotify: https://open.spotify.com/artist/6vWDO969PvNqNYHIOW5v0m
href: https://api.spotify.com/v1/artists/6vWDO969PvNqNYHIOW5v0m
id: 6vWDO969PvNqNYHIOW5v0m
name: Beyoncé
type: artist
uri: spotify:artist:6vWDO969PvNqNYHIOW5v0m
available_markets:
disc_number: 1
duration_ms: 261640
explicit: false
external_ids:
ean: null
isrc: USSM10804556
upc: null
external_urls:
spotify: https://open.spotify.com/track/4JehYebiI9JE8sR8MisGVb
href: https://api.spotify.com/v1/tracks/4JehYebiI9JE8sR8MisGVb
id: 4JehYebiI9JE8sR8MisGVb
image_url:
https://i.scdn.co/image/ab67616d0000b273801c4d205accdba0a468a10b
is_local: false
is_playable: null
name: Halo
popularity: 71
preview_url: null
restrictions: {}
track_number: 2
type: track
uri: spotify:track:4JehYebiI9JE8sR8MisGVb
```
--
Reply to this email directly or view it on GitHub:
#2601 (reply in thread)
You are receiving this because you were mentioned.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
HA 2025 RC release looks promising with this: home-assistant/core#133521 i think this will allow someone to actually make a native card/frontend feature for searching a MASS library. |
Beta Was this translation helpful? Give feedback.
-
Like Jake said, I'm just waiting for the core mass to add and fix things. After all this is a discussion about a frontend for mass.
…On Dec 25, 2024, 12:03 AM, at 12:03 AM, Colton YYZ ***@***.***> wrote:
Thank you!!! I had the wrong spotifyplus installed. I didn't notice
there are (2):
- https://github.com/thlucas1/homeassistantcomponent_spotifyplus
- https://github.com/hokiebrian/spotify_plus
The second one is the one that you reference in your link - for others
who didn't know this already! :(
--
Reply to this email directly or view it on GitHub:
#2601 (reply in thread)
You are receiving this because you were mentioned.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
grabacion-2025-01-08-182219_1Z2UvBcf.mp4It's just a little multiplayer prototype. |
Beta Was this translation helpful? Give feedback.
-
20240709105204.mp4
A custom Lovelace UI I built using the picture-elements card as the base, with a bunch of different cards both built-in and from HACS. This was made for a 13" 1920x720 touch screen I have setup on my main stereo. The UI is obviously based around Volumio's new UI with a few changes to make it more touch friendly on my display and easier to see from a distance.
If there is interest I will share the yaml for it, though there is quite a bit you would need to setup and change in your home-assistant instance.
The part that has been driving me crazy is the iFrame cards used to look at Search, Playlists, Artists, etc. I can get rid of the scrollbars on my side of the iFrame, but since I can't card_mod into an iFrame page, I cant get rid of the scrollbars built into MASS UI. Please please please devs, add some CSS styling for your scroll bars to hide them, you are looking like WinXP over here.
The link below is to a feature request I opened with some ideas on how to create these types of layouts easier, with more customization, and more options.
(https://github.com/orgs/music-assistant/discussions/2586)
Beta Was this translation helpful? Give feedback.
All reactions