lukx / home-assistant-jukebox

Home-Assistant Radio Station and Stream Selector Card
65 stars 33 forks source link

Buttons not displaying in 2021.11 #28

Closed tanderson1992 closed 2 years ago

tanderson1992 commented 2 years ago

I didn't catch the exact version, but somewhere in the 2021.10-2021.11 updates, HA apparently changed the way icons are handled. Many of my custom cards no longer displayed icons. The ones in development issued updates, and the icons returned. Please apply whatever changes are necessary to display the icons. I'm researching the issue and will see if I can find the fix on another project that already updated.

jukebox

This shows no play, pause, stop buttons displayed. Reloading lovelace and restarting HA had no affect.

tanderson1992 commented 2 years ago

Ok, the change seems to have been made in the base HA core that breaks all custom cards using ha-icon-button. See this issue: https://github.com/home-assistant/frontend/issues/10521. There seems to be a relatively easy fix, but I'm not smart enough in js to figure out how to apply it to this card.

Sample fix from another custom card:

FROM

           <ha-icon-button
              icon="mdi:skip-previous"
              role="button"
              @click=${this._service(domain, "media_previous_track", entity)}
            ></ha-icon-button>

TO

           <ha-icon-button
              icon="mdi:skip-previous"
              role="button"
              @click=${this._service(domain, "media_previous_track", entity)}
              ><ha-icon icon="mdi:skip-previous"></ha-icon
            ></ha-icon-button>
andreimoraru commented 2 years ago

@tanderson1992 @lukx I have a tested fix for this issue. I can open a PR. Please have a look at it. https://github.com/andreimoraru/home-assistant-jukebox/pull/9

tanderson1992 commented 2 years ago

@andreimoraru that seems to work for me, thank you!

EDIT: For others like me with less experience, if you installed with HACS, you can update the .js file which should be under /www/community/home-assistant-jukebox. However, it;s also necessary t delete the .gz file or HA will keep using the unmodified card. Probably the easiest way is to wait for the PR and HACS update, but I didn't want to wait.

lukx commented 2 years ago

Thank you! @andreimoraru kindly open a PR and I will merge it!

EduardJogi commented 2 years ago

Hi all, was this already merged?

llego commented 2 years ago

Hello, I would appreciate it if this was fixed as the jukebox is a central piece of functionality on my dashboard. @andreimoraru, did you open a PR for this? Perhaps @tanderson1992 can do it aswell?

Dinges28 commented 2 years ago

Pull Request is made to fix the Mute and Stop buttons

29

lukx commented 2 years ago

Thank you ! Merged!