I have 3 instances of HA running in different houses. Most of config items are organized as packages. Some subset of the packages is common across all 3 instances, so I separated them out into a “common” packages folder. All three instances could then be hosted in a single common config repo, each instance using its own packages folder and hopefully getting the common part too.
Now, the problem is how to combine two folders, one with the instance-specific and one with the common packages, into one folder. Preferably, without copying of the contents.
I tried putting a symlink to the common folder inside each instance-specific package folder. No luck. HA does not follow the symlink to the common folder. What i had was:
# Files / folders:
packages/common:
various_common.yaml
packages/site1:
common -> ../common
various.yaml
packages/site2:
common -> ../common
various2.yaml
# Config of site 1:
packages: !include_dir_named packages/site1
# Config of site 2:
packages: !include_dir_named packages/site2
OS follows such a symlink fine, but HA basically ignores it.
I also tried telling HA to read two folders this way:
packages: !include_dir_named packages/common
packages two: !include_dir_named packages/site1
Also, does not work.
For now, I just copy packages/common to packages/site1/common and declare packages: !include_dir_named packages/site1
but this is very ugly.
Can you think of any better method for combining multiple folders into one for HA packages? Or maybe you know how to ask HA to read packages from two different folders?
Actually, I’d love to achieve more: compose the whole config dir structure from the common and the site-specific source dirs containing not only packages but also custom_components, python_scripts, lovelace panel configs, www, appdaemon apps etc, but let us start with a simpler problem