I just ran across a repeatable issue with phu: icons not loading on the dashboard. It’s always been “refresh cache” but that’s never fixed it for me – sometimes made it worse. See a repeatable failure here: Imgur: The magic of the Internet (too large for in-line).
The setup is simple: I have a Christmas Tree phu: icon used on two entities. They are the dashboard. When I reload, hard-refresh, the icons don’t show. However, when I edit the block - it’s there; and, only when I hit save does it successfully load both entities on the dashboard.
This definitely points to something on the dashboard failing to properly load the icons pack for the dashboard only.
This issue has been bugging me for “decades” (okay, months, but feels like decades!), and I finally stumbled upon a situation that actually replicated for me:
Edit, see it, save: both load
Hard refresh (Shift-Cmd-R): both icons disappear.
Edit, see it, save: both icons load.
This solution IS working. And it appears to be solid. I refreshed dozen of times on the browser, tablet, and the macOS app, and the icons remain! Woohoo!
So, the issues does appear to be how it’s getting loaded in the resources. More details on my install:
Not a big expert, but imho in both cases JS files are loaded on a client side. I am going to dig into it deeper; so far I noticed that a JS module loaded as a “dashboard resource” does not work on system (not dashboard) pages; but that “extra” thing works everywhere.
That would make sense. I’d expect that. With that in mind, maybe there’s something holding back loading certain modules until it “validates” the dashboard is actually using it? And with non-mdi: icons, it’s having a hard noticing they are being actively used on the dashboard? I had notice card-mod sometimes fails to load, too. I moved that to an “extra” as well and it’s more reliable as well.
Apparently it’s a “known issue” for card-mod – they have a “Performance Improvements” section (see additional footnote 1) and actually mentions this in the console which I just noticed while debugging this issue.
Imho cardmod is a different thing; btw, try remove it from resources and add ONLY as an extra module, it should probably work (may be it will not with a cast, cannot check).