Packages equivalent for custom_components

Hi,

Having the ability to add custom components under <config directory>/custom_components is really great.

However, when you want to import components from multiple sources, they all get mixed up under the same root folder. It adds complexity to installs, updates and uninstalls.

For example, let’s say I want to add 2 lights components.
I have to create :

  • <config directory>/custom_components/light/my_light_1.py
  • <config directory>/custom_components/light/my_light_2.py

For complex components with files under various <component name>, it gets messy very fast.

An easy way to handle this would be to have the equivalent of configuration packages.

That would allow components at paths like :

  • <config directory>/custom_components/light/old_path_light.py
  • <config directory>/custom_components/packages/foo/my_light_1.py
  • <config directory>/custom_components/packages/bar/my_light_2.py

For components shared via git, installing and updating is as easy as git commands.
To remove a package, a simple rm is enough.