[GH-ISSUE #5] Change Background Image #6

Closed
opened 2026-05-07 00:17:03 +02:00 by BreizhHardware · 7 comments

Originally created by @myk3y55 on GitHub (Aug 18, 2024).
Original GitHub issue: https://github.com/Nezz/homeassistant-visionos-theme/issues/5

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

Originally created by @myk3y55 on GitHub (Aug 18, 2024). Original GitHub issue: https://github.com/Nezz/homeassistant-visionos-theme/issues/5 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
Author
Owner

@Nezz commented on GitHub (Aug 18, 2024):

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:

  1. Install the theme using HACS if your home installation supports it
  2. Disable experimental mode in HACS from Settings > Devices & services > HACS > Configure. In experimental mode themes can't serve images.
  3. If the above does not help our you cannot use HACS, follow the steps here and change the URL in visionos.yaml from /hacsfiles/themes to /local/themes
<!-- gh-comment-id:2295247411 --> @Nezz commented on GitHub (Aug 18, 2024): You can set a custom dashboard background [from the UI](https://www.home-assistant.io/blog/2024/06/05/release-20246/#setting-a-dashboard-background). 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: 1. Install the theme using HACS if your home installation supports it 2. Disable experimental mode in HACS from Settings > Devices & services > HACS > Configure. In experimental mode [themes can't serve images](https://github.com/hacs/integration/issues/3751#issuecomment-2144312113). 3. If the above does not help our you cannot use HACS, follow the steps [here](https://github.com/basnijholt/lovelace-ios-themes/issues/47#issuecomment-1372990987) and change the URL in visionos.yaml from `/hacsfiles/themes` to `/local/themes`
Author
Owner

@myk3y55 commented on GitHub (Aug 21, 2024):

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

<!-- gh-comment-id:2301620456 --> @myk3y55 commented on GitHub (Aug 21, 2024): 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
Author
Owner

@Nezz commented on GitHub (Aug 21, 2024):

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.

<!-- gh-comment-id:2301830895 --> @Nezz commented on GitHub (Aug 21, 2024): 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.
Author
Owner

@rohankapoorcom commented on GitHub (Aug 22, 2024):

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

<!-- gh-comment-id:2303365461 --> @rohankapoorcom commented on GitHub (Aug 22, 2024): 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
Author
Owner

@Nezz commented on GitHub (Aug 22, 2024):

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.

<!-- gh-comment-id:2303974210 --> @Nezz commented on GitHub (Aug 22, 2024): 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.
Author
Owner

@rohankapoorcom commented on GitHub (Aug 22, 2024):

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).

<!-- gh-comment-id:2305181471 --> @rohankapoorcom commented on GitHub (Aug 22, 2024): 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).
Author
Owner

@Nezz commented on GitHub (Aug 22, 2024):

Version 1.2 has been released that supports HACS 2.0.

<!-- gh-comment-id:2305403802 --> @Nezz commented on GitHub (Aug 22, 2024): Version 1.2 has been released that supports HACS 2.0.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/homeassistant-visionos-theme#6
No description provided.