Closed myk3y55 closed 2 months ago
You can set a custom dashboard background from the UI.
If you want to fix the root cause of the problem, note that the theme uses images served by HACS. There a couple ways to fix this:
/hacsfiles/themes
to /local/themes
Thanks for the quick reply! I tried all of the above and didn't work for me. Changing the bg image from the ui does nothing, the default theme image still persists. Experimental mode was ticked off and changing the file location from /hacsfiles/themes to /local/themes and even /config/themes only resulted in no bg image at all (even when changing bg image from the ui). I did a ha restart after every change as well just to be sure. Checked on both computer browser and ios ha app with same results. Maybe this is due to some changes in the latest ha updates? I will try various other things and report back if i find anything
If changing the background image from the UI doesn't do anything then there is probably something specific in your HA installation causing this that you'd need to debug yourself. You should be able to see from your browser's inspector what happens to the network request that tries to retrieve the background image.
Since HACS 2.0 has gone out today (this releases experimental mode and there is no longer a way to turn it off), I would recommend loading the background images through base64 instead as that's the best path forward for themes to ship their own images. You can see my example of how to do this here: https://github.com/basnijholt/lovelace-ios-themes/pull/70
Thanks for the heads-up @rohankapoorcom. My main reservation was that images can be cached, but if we serve it in the theme then I think we always need to transfer a megabyte worth of image when loading the dashboard. It might be better to put the image on an external site to keep dashboard loading quick.
I agree that it's a downside, but removing support within HACS is an intentional architectural decision (https://github.com/hacs/integration/issues/3751#issuecomment-2144327287).
Personally, I wouldn't want to manage backgrounds independently of the theme and I don't like the idea that a theme doesn't ship completely ready to go from HACS. And I would rather have the slightly slower page load compared to downloading from an external CDN (defeats the purpose of serving everything locally).
Version 1.2 has been released that supports HACS 2.0.
Firstly, thank you for the great work you have put into this custom component! The issue i have is that i cannot seem to be able to change the background image when using visionos theme. The default ha background image feature does not work, neither is changing the actual images in the theme folder (with the same name night.jpg or day.jpg). I should mention that i restarted ha after each change and the default visionos theme image still persists.. I've set visionos theme for each dashboard view individually and not from the user settings. Running ha 2024.8.2