Managing custom_components

Being new to this game, I’m still trying to work out the best way of managing custom components that need to be in one custom_components directory but may come from different repositories and want regular pulling.

In addition, I noticed in one of the hassio logs that if there are ‘.git’ folders under /config, HA will scan them and all their contents when looking for updates, which seems wasteful.

So I’m wondering about putting the git clone somewhere else and arranging for the working directory to be custom_components. Something like the following:

git --work-tree=/config/custom_components \
    --git-dir=/someotherplace/mycomponent.git \

Then you can do all the git operations under /someotherplace/evohome.git but the files will actually be stored in the right place. Does that sound good? Of course, it won’t work if more than one repo has a README or a LICENSE at the top level :slight_smile: But assuming no filename clashes, I think this might work.

Anyone got any other recommendations?

a lot of custom components use the custum updater. That way you don’t need to pull the repo yourself.
It works really good, especially with the tracker card for lovelace.

1 Like

Last week I also published this tool to help with this :slight_smile: