Config splitting by packages: how do you exclude whole folders?

Assume that splitting is made by using packages:

homeassistant:
  packages: !include_dir_named conf

and you have a tree-like structure like this one:

The idea is to keep config in folders like “Volvo XC9999”, “Garden”, “Device XYZ”.
And if I need to disable some package, I have to rename yaml-file(s) - change an extension from “.yaml" to smth like ".dis”.
And if I need to disable a whole FOLDER - this renaming should be done for each yaml-file inside this folder.

Is there any SIMPLER way to exclude the whole folder from this “packaging” process?
(and I do not want to move this folder out of the “conf” folder)


Registered a FR for this: Using packages for config splitting: ignoring folders

I’m not aware of such functionality.

But what you can do is this:

Make a wrapper script for your HA restart command. In that script check for your chosen naming convention to indicate a disabled folder. Rename all the files in that folder. And vice versa.

Or you could make a script using a file watcher which you run as a daemon. This can then do the same renaming as above.

Thanks a lot for sharing experience.
I was thinking about mass-renaming files…
Even created a *.bat file (or how it is called in *nix) to rename them.
But I found this not convenient.

What I do currently:

  1. If one file (several files) are excluded - rename them to “*.dis” (even if whole folder is excluded) (+keep in mind that some file could be already excluded).
  2. If a folder with subfolders is excluded - I have to move the folder outside into some dedicated folder (and have to keep in mind where this folder was located; this is not critical, it will work anyway wherever you place it back; just to keep an order).

A real life use-case: due to some work in my garden I have to temporarily disable all functionalities related to some building (electricity, climate control, security etc).

In a large setup excluding / including packages by moving them is not a good idea…
Everything must be in order ).