Minimalistic Media Controls in Home Assistant

Поделиться
HTML-код
  • Опубликовано: 27 янв 2025

Комментарии • 24

  • @My_Smart_Home
    @My_Smart_Home  2 месяца назад +2

    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 %}

    • @deralte680
      @deralte680 2 месяца назад

      nice one, thanks. Even Chat GPT proposals didn't work :-D

  • @olofalbertsson
    @olofalbertsson 2 месяца назад +2

    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.

  • @GiovanniPirotta
    @GiovanniPirotta 2 месяца назад +3

    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

  • @oldsmarthome
    @oldsmarthome 2 месяца назад

    Fin guide til folk som vil lage UI selv.😊 Hyggelig å se det er flere som liker å lage Custom dashbords!

  • @niektillema9251
    @niektillema9251 2 месяца назад +1

    Amazing work man. You really got me into the dashboard customization stuff!

  • @markshaz8691
    @markshaz8691 2 месяца назад +1

    Love your work dude.

  • @jameskelly5161
    @jameskelly5161 2 месяца назад +3

    If you could show the Spotify/sonos playlist setup that would be great

    • @My_Smart_Home
      @My_Smart_Home  2 месяца назад +2

      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

  • @metaform1049
    @metaform1049 2 месяца назад

    Nice, I love your style and design! So clean. Which sound-system do you use?

    • @My_Smart_Home
      @My_Smart_Home  2 месяца назад +1

      I use Symfonisk speakers from Ikea/Sonos

  • @deralte680
    @deralte680 2 месяца назад

    really cool. I'll use some of this in my dashboard as well I think. Did you try Music Assistant yet?

    • @My_Smart_Home
      @My_Smart_Home  2 месяца назад +2

      I did. Its a bit too big for our taste, we need something simpler to just start some music.

    • @deralte680
      @deralte680 2 месяца назад

      @@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?

    • @My_Smart_Home
      @My_Smart_Home  2 месяца назад +1

      @@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

  • @JaJor90
    @JaJor90 2 месяца назад

    Cala-calacutta-cutta ey oh ey oh! 😆

  • @nkolasmaer
    @nkolasmaer 2 месяца назад

    great work as always! Can you please explain how your icons change based on the status (play/pause)?

    • @My_Smart_Home
      @My_Smart_Home  2 месяца назад +1

      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 %}

    • @nkolasmaer
      @nkolasmaer 2 месяца назад

      @@My_Smart_Home thank you so much :)

  • @corkflakes
    @corkflakes 2 месяца назад

    Just 58 second after the publishing :D

  • @HangingBack
    @HangingBack 2 месяца назад +1

    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.