I am trying to change the background of my dashboard. Not sure why such a simple task is so difficult. I read all threads but nothing seems to be working.
I don’t have any themes. This is the default home assistant theme
I uploaded the image to the correct path (www/pictures/bc.jpg)
I clicked edit on my dashboard and just added:
views:
- title: Home
background-image: center / cover no-repeat fixed url("/local/pictures/bc.jpg")
I tried to clear browser cache, restart HA… it completely ignores it. No errors in the console, no errors in the logs…
Didn’t work for me. At the end I ended up creating my own theme and then it worked. I didn’t find a way to set a default background image without creating a new theme.
Thank you, but I tried this yaml in so many variants! And, is it really /local/? My home assistant themes are in /homeassistant/themes.
I added file in /homeassistant/themes-pics/back.jpg and added this to the theme:
lovelace-background: center / cover no-repeat fixed url(‘/homeassistant/themes-pics/back.jpg’)
and yes, I also tried /local… with and without double quotes
therefor I tried with my local file and even that fails:
background-image: “center / cover no-repeat fixed url(‘/homeassistant/themes-pics/back.jpg’)”
lovelace-background: var(–background-image)
Ah, that explains a lot!
I finally have what it needs. And I learned an important thing here. I guess all stuff like pictures needed should be in www.
Thanks, another thing solved… Up to next struggle.
it is almost impossible to find in the HA docs (unless you know exactly what it is on about, in which case you dont need it…) , but this is the official text:
be ware that this is not a secured folder, and all files there are open to the public… as explained in the red block
if you require secure files, you should file them in the /media share.
you will experience difficulty opening those up to the front-end though…