For those wondering about how to change the icons based on shuffle/repeat/play/pause. I actually made a mistake and forgot to put it in the video, its in my original screen recording 😟 I'll make an update video asap including a few other things as well. For now, this is the code I use to change the icons based on state. For shuffle and repeat: - icon: |- {% if state_attr('media_player.speaker', 'repeat') == 'off' %} mdi:repeat-off {% else %} mdi:repeat-variant {% endif %} For play/pause: - icon: |- {% if states('media_player.speaker') == 'playing' %} mdi:pause {% else %} mdi:play {% endif %}
I've done something similar, to avoid the disappearing of the cover art you can create a timer to leave the image visible, for instance for 3 minutes, after pausing
Yeah, I'll add to this setup. But its pretty simple to be honest. Its just a script that starts a spotify playlist. Something like this: action: media_player.play_media target: entity_id: media_player.stue data: media_content_id: >- spotify:user:spotify:playlist:6IKQrtMc4c00YzONcUt7QH?si=bb9f5491f0d24d71 media_content_type: playlist You get the url to the playlist by copying from Spotify
@@My_Smart_Home Yes, Its quite mighty I´d say. Another question/proposal. It would be really nice, if the percentage of volume is displayed while using the slider. Is there a chance to get there?
Oh my, by mistake I've actually edited it out of the video 😞 I have it recorded and everything. I'm gonna make a update video asap, but for now this is the code that I'm using. For shuffle and repeat: - icon: |- {% if state_attr('media_player.speaker', 'repeat') == 'off' %} mdi:repeat-off {% else %} mdi:repeat-variant {% endif %} For play/pause: - icon: |- {% if states('media_player.speaker') == 'playing' %} mdi:pause {% else %} mdi:play {% endif %}
This is a perfect example of why I'm not a big fan of the HA forums, we need somewhere to showcase cards and stuff like this! The "Share your project" subforum is shit for showcasing nice custom cards.
For those wondering about how to change the icons based on shuffle/repeat/play/pause. I actually made a mistake and forgot to put it in the video, its in my original screen recording 😟
I'll make an update video asap including a few other things as well.
For now, this is the code I use to change the icons based on state.
For shuffle and repeat:
- icon: |-
{% if state_attr('media_player.speaker', 'repeat') == 'off' %}
mdi:repeat-off
{% else %}
mdi:repeat-variant
{% endif %}
For play/pause:
- icon: |-
{% if states('media_player.speaker') == 'playing' %}
mdi:pause
{% else %}
mdi:play
{% endif %}
nice one, thanks. Even Chat GPT proposals didn't work :-D
This is great! I would like to see an option to choose media, like artists, tracks or Spotify playlists directly from the card as well.
I've done something similar, to avoid the disappearing of the cover art you can create a timer to leave the image visible, for instance for 3 minutes, after pausing
Fin guide til folk som vil lage UI selv.😊 Hyggelig å se det er flere som liker å lage Custom dashbords!
Amazing work man. You really got me into the dashboard customization stuff!
Love your work dude.
Thanks :)
If you could show the Spotify/sonos playlist setup that would be great
Yeah, I'll add to this setup. But its pretty simple to be honest. Its just a script that starts a spotify playlist.
Something like this:
action: media_player.play_media
target:
entity_id: media_player.stue
data:
media_content_id: >-
spotify:user:spotify:playlist:6IKQrtMc4c00YzONcUt7QH?si=bb9f5491f0d24d71
media_content_type: playlist
You get the url to the playlist by copying from Spotify
Nice, I love your style and design! So clean. Which sound-system do you use?
I use Symfonisk speakers from Ikea/Sonos
really cool. I'll use some of this in my dashboard as well I think. Did you try Music Assistant yet?
I did. Its a bit too big for our taste, we need something simpler to just start some music.
@@My_Smart_Home Yes, Its quite mighty I´d say. Another question/proposal. It would be really nice, if the percentage of volume is displayed while using the slider. Is there a chance to get there?
@@deralte680 Good idea. I'll add it to the list. I'll try to make a new video this weekend, but I'm a bit busy so might be early next week
Cala-calacutta-cutta ey oh ey oh! 😆
yeah... 😅
great work as always! Can you please explain how your icons change based on the status (play/pause)?
Oh my, by mistake I've actually edited it out of the video 😞 I have it recorded and everything. I'm gonna make a update video asap, but for now this is the code that I'm using.
For shuffle and repeat:
- icon: |-
{% if state_attr('media_player.speaker', 'repeat') == 'off' %}
mdi:repeat-off
{% else %}
mdi:repeat-variant
{% endif %}
For play/pause:
- icon: |-
{% if states('media_player.speaker') == 'playing' %}
mdi:pause
{% else %}
mdi:play
{% endif %}
@@My_Smart_Home thank you so much :)
Just 58 second after the publishing :D
Impressive
This is a perfect example of why I'm not a big fan of the HA forums, we need somewhere to showcase cards and stuff like this! The "Share your project" subforum is shit for showcasing nice custom cards.