kalkih / mini-media-player

Minimalistic media card for Home Assistant Lovelace UI
MIT License
1.51k stars 206 forks source link

Icons missing after update to v1.12.0 #467

Closed mamoel666 closed 3 years ago

mamoel666 commented 3 years ago

This morning I updated to v1.12.0 via HACS. Now the icons are missing.

Example config:

  - type: custom:mini-media-player
    icon: mdi:theater

I restarted HA and cleared browser cache.

Environment: Home Assistant 2020.12.2 in Docker (Synology NAS).

Krocko commented 3 years ago

Same for me.

agneevX commented 3 years ago

For now, you can you can set icon to anything like icon: s and it reverts to the entity's icon.

nepozs commented 3 years ago

But icons do not show at all, last working version with working icons is 1.11.0 (so I've temporary downgraded mini media player) btw thanks - it is great project

System Health

version 2021.1.1
installation_type Home Assistant OS
dev false
hassio true
docker true
virtualenv false
python_version 3.8.7
os_name Linux
os_version 5.4.86
arch x86_64
timezone Europe/Warsaw
Home Assistant Community Store GitHub API | ok -- | -- Github API Calls Remaining | 4093 Installed Version | 1.9.0 Stage | running Available Repositories | 773 Installed Repositories | 56
AccuWeather can_reach_server | ok -- | -- remaining_requests | 47
Airly can_reach_server | ok -- | --
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Hass.io host_os | Home Assistant OS 5.10 -- | -- update_channel | stable supervisor_version | 2020.12.7 docker_version | 19.03.13 disk_total | 219.4 GB disk_used | 23.9 GB healthy | true supported | true board | intel-nuc supervisor_api | ok version_api | ok installed_addons | Home Assistant Google Drive Backup (0.103.0), Log Viewer (0.9.1), Check Home Assistant configuration (3.6.0), chrony (1.1.3), Samba share (9.3.0), Terminal & SSH (8.10.0), motionEye (0.10.2), AppDaemon 3 (5.0.1), ESPHome (1.15.3), Example (3.5.1), Node-RED (7.2.11), Bitwarden RS (0.6.2), ESPHome (dev) (dev), Glances (0.9.1), Grocy (0.9.2), Folding@home (0.2.0), File editor (5.2.0), Spotify Connect (0.8.2), Portainer (1.3.0), ZeroTier One (0.9.0), Mosquitto broker (5.1)
Lovelace dashboards | 2 -- | -- mode | storage views | 18 resources | 29
kineticscreen commented 3 years ago

Yeah I can't quite work it out - it has something to do with when an icon is overidden in the front end UI via the entities page.

koenadolfs commented 3 years ago

Same here. I have icons overwritten at the entity level, but indeed do not show up since the last update. Weirdly, the effects seems to differ between devices.

nepozs commented 3 years ago

I don't use icon customization nor entity level icon override, so it does not look as cause… mini_media_player_no_entity_level_customization_icon_Screenshot_2021-01-13 Configuration - Home Assistant mini_media_player_no_customization_icon_Screenshot_2021-01-13 Configuration - Home Assistant

Drafteed commented 3 years ago

Same issue

iptvcld commented 3 years ago

same issue for me; i ended up adding the icon mdi into the customize.yaml file

cooperaj commented 3 years ago

I have 6 mini media players on a tab of my UI. Each one is overridden in the ui using icon: mdi:icon-name. Only the first such icon on the page shows up. The others all show blank spaces.

If I remove the ui overrides then the default icon shows up just fine. As @iptvcld says above you can then use the customize.yml file to do what you want. I would rather not do that though.

I would hazard a guess it's something to do with the change made here

sasukebinbin commented 3 years ago

Same here

leranp commented 3 years ago

Same here

ranrinc commented 3 years ago

Quick Fixed for those who want to do it manually while waiting for the next release.

Edit your js on ./www/community/mini-media-player-bundle.js using your noteeditor

search for return this.config.icon ? this.player.icon : ICON.DEFAULT; and change it to return this.config.icon ? this.player.icon || ICON.DEFAULT; and you should have working mini-media-player

Enjoy

nepozs commented 3 years ago

@ranrinc It does not help, so as temporary fix downgrade to 1.11.0 stlli is better…

ranrinc commented 3 years ago

@ranrinc It does not help, so as temporary fix downgrade to 1.11.0 stlli is better…

It's working for me...

Screen Shot 2021-01-21 at 8 27 26 AM

Screen Shot 2021-01-21 at 8 27 42 AM

Anyway like I said its a quick solutions

akeslo commented 3 years ago

Quick Fixed for those who want to do it manually while waiting for the next release.

Edit your js on ./www/community/mini-media-player-bundle.js using your noteeditor

search for return this.config.icon ? this.player.icon : ICON.DEFAULT; and change it to return this.config.icon ? this.player.icon || ICON.DEFAULT; and you should have working mini-media-player

Enjoy

I made the change but how do I clear the JS cache so that this updates in the UI?

ranrinc commented 3 years ago

Quick Fixed for those who want to do it manually while waiting for the next release. Edit your js on ./www/community/mini-media-player-bundle.js using your noteeditor search for return this.config.icon ? this.player.icon : ICON.DEFAULT; and change it to return this.config.icon ? this.player.icon || ICON.DEFAULT; and you should have working mini-media-player Enjoy

I made the change but how do I clear the JS cache so that this updates in the UI?

In my case refresh HA and you should see the implementations

N36 commented 3 years ago

I got it working by just defining 'mdi:icon-name' under the icon tab in my HASSIO entities section.

DavidFW1960 commented 3 years ago

Edit your js on ./www/community/mini-media-player-bundle.js using your noteeditor

search for return this.config.icon ? this.player.icon : ICON.DEFAULT; and change it to return this.config.icon ? this.player.icon || ICON.DEFAULT; and you should have working mini-media-player

So I tried this hack but I do not find this text anywhere in the js

return this.config.icon ? this.player.icon : ICON.DEFAULT

I also installed the repo and looked for it in main.js file there and made a comparable change to source code but then it would not compile.

I got it working by just defining 'mdi:icon-name' under the icon tab in my HASSIO entities section.

I don't understand what you mean with this? Which entity? what icon tab?

N36 commented 3 years ago

chrome_foYC5NVFzm Just go into Configuration > Entities > Your-Entity. Then add the manual mdi icon as above. It will then appear in your lovelace UI.

schteff commented 3 years ago

Just to be clear. That is not a final solution, just a quick fix if you are in a hurry to see the icons. The real problem has to be fixed in mini-media-player and released in a new version.

DavidFW1960 commented 3 years ago

Well I was attempting the quick fix and also fixing the card but the posted solution... well that text isn't found and if I edit the js file it won't compile

tomlut commented 3 years ago

Yeah my js file does not contain that text either.

tomlut commented 3 years ago

@ranrinc It does not help, so as temporary fix downgrade to 1.11.0 stlli is better…

Rolling back to 1.11.0 made no difference (yes I cleared my browser cache).

Looks like Customize is the best solution for now.

kalkih commented 3 years ago

Hopefully fixed now, let me know 🙂

nepozs commented 3 years ago

For me v1.12.1 works OK