UI help on a docker installation (can't apply theme, can't use custom card, ui-lovelace.yaml missing)

I restarted home assistant from scratch, as my raspberry pi’s SD card corrupted and I lost everything.

This time, I decided to install home assistant on my existing Synology NAS under docker environment. It is a logical choice because it the Synology NAS is one device which is on all the time. And it has RAID protection which will prevent what happened to me last time from happening again.

I was playing with this new installation for weeks until I get to the UI part. This entire lovelace is new thing to me, so I really want to give it a try. It is until then I discover my official docker-image installation is a bit broken… and I need you guys help.

I installed HACS by putting files to the right place, it seems to work (please see firsts attached screenshot).
homeAsst-ui-hacs

Then, I tried to install custom cards without much luck… then, I notice that I don’t have the “front end” tab:

First question: am I suppose to have a “frontend” tab in HACS and all the custom cards suppose be there?

Then, I tried to install different themes via HACS without much luck. I can see all the files are in place inside my home Assistant volume (i use hostpath to mount the config directory to my NAS host). But none of installation, restart has any effect.

Yes, I went through the document. it doesn’t make any sense whatsoever. Remember, for more than one year, I edited configuration.yaml by hand, so it’s not that I am new to this, but the instruction on “frontend” and “theme” is utterly confusing

(I don’t want “happy” or “sad”, I just want to change to dark theme all the time, period… and the “frontend” documentation didn’t say anything about that)

Then, I tried to activate UI via GUI by go to my “profile”, I tried to activate the theme there, but the theme is gray out:
homeAsst-ui-theme-unable

Second question: what have I done wrong? Do I need to add “theme” to “frontend” in my configuration.yaml file manually? If yes, what is the appropriate syntax after “themes”?

Dig further, rather it’s custom card or what not, documents says that i need to make sure the resources are there in the ui-lovelace.yaml.

And here is what make me really confused: I don’t have ui-lovelace.yaml, EVER. Since I never had ui-lovelace.yaml, I naturally don’t know how to construct/reconstruct it.

(notice that I looked for ALL yaml file and there are no ui-lovelace.yaml)

I do see a filename called “lovelace” in .storage directory. It looks like a json file. But I have tried to manually edit files in .storage directory and it tend to cause my home assistant to crash, thus, I am a bit reluctant to edit them myself.

Third question: Where do I get this “ui-lovelace.yaml” ? Can I construct it from the .storage/lovelace file? Remember, I am using the official home Assistant docker image, but it is still not working. howcome? Do I even need this ui-lovelace.yaml file to apply themes / use custom cards?

Most importantly, how to apply themes and use custom cards?

Thanks in advance

Harv

I’ve never seen a “frontend” tab in HACS. If it’s supposed to be there I’m missing it too. :grinning:

But all of the custom cards (at least the ones that are available thru HACS - not all are) will be in the plugin tab of HACS.

Yes, you need to add themes to your frontend section of configuration.yaml

then the themes should be available in HACS.

When you install themes using HACS it will store them in a “themes” directory. You need to add that directory by using an !include statement:

frontend:
  themes: !include_dir_merge_named themes

You are reading old documentation.

The resources go in the lovelace section of your configuration.yaml if you are using yaml mode. If you don’t use yaml mode (which you aren’t) then go to the configuration page and look for “lovelace dashboards”. There will be a tab at the top to add resources.

If you don’t use yaml mode you don’t need a ui-lovelace.yaml file.

And lastly you should almost never ever need to edit the files in the storage directory.

Thank you for helping me.

frontend:
  themes: !include_dir_merge_named themes

I am one of those who can hardly understand MAN page precisely because it typically doesn’t give concrete example.

I don’t know "includ_dir_merge_named" themes means

For example, there is a themes directory automatically created by HACS. Since I have installed a couple themes, i see files are being copied there:

what should be the configuration look like? I tried:

frontend:
  themes: /media/nasDocker/homeassistant/config/themes themes
frontend:
  themes: /media/nasDocker/homeassistant/config/ themes
frontend:
  themes: /media/nasDocker/homeassistant/config/themes midnight
frontend:
  themes: /media/nasDocker/homeassistant/config/themes/midnight midnight

none of them worked!

That’s because you didn’t use the code I gave you.

Just copy the code as I gave you above into your configuration.yaml and it will work.

see here for how to use !include*:

Can’t believe this, you literally spoon-fed me and I wasn’t taking the spoon.

Thank you! It works now!

1 Like

Pro-tip: to avoid a situation on your NAS, similar to what happened to your RPi, make sure you have a backup copy of the config folder that contains your configuration and associated files that’s mapped to your docker container. something as simple as a nightly or weekly sync to a private github repository or just a copy and paste script to an external hard drive connected to the NAS.

RAID is not a Backup! RAID protects a single copy of data from corruption due to minor or limited hardware or software failure. RAID allows ensures data integrity and availability not data continuity. Data loss is entirely possible with RAID. A backup is a second copy of the same data in a physically different set of equipment and location that can replace the original up to the date of the backup in the event of data loss.

Thanks for the heads up.

I read a blog post somewhere before, one of the 7 “best practice” he mentioned is backing up the configuration file to github.

I will have to clean up the configuration files first and will do that later. Thanks