How to disable one of multiple package folders?

Hey guys,

I have call my package folders like this: packages: !include_dir_named packages/

Inside the packages folder i have several subfolders named according to the project they contain.

I want to be able to disable a specific subfolder.

I tried the following configuratin in order to be able to comment out whatever i wanted but it seems it only loads half the included stuff (I am guessing it only loads a component once, then ingores the rest):

  packages: 
    pack_1: !include_dir_merge_named packages/ac_operation
    pack_2: !include_dir_merge_named packages/garage
    pack_3: !include_dir_merge_named packages/garden
    pack_4: !include_dir_merge_named packages/irrigation
    pack_5: !include_dir_merge_named packages/kiosk_tab
    pack_6: !include_dir_merge_named packages/media_remote
    pack_7: !include_dir_merge_named packages/mockupancy
    pack_8: !include_dir_merge_named packages/sonoffs_wifi_signal
    pack_9: !include_dir_merge_named packages/vacuum

Is there any way to write this up?

Thanks in advane,
k.

I can’t think of a way to do it when using folders for the different packages but the next question is why use subfolders for the packages?

if you just use individual package yaml files you could then just easily rename your package yaml file to some other extension (i.e. add .old to the end or something) and HA won’t load that particular package. That’s what I have done in the past and it works great.

Obviously, I don’t know the rest of your organization structure within those subfolders so it might not work in your situation but I figured i’d throw it out there.

I have the above subfolders and in each subfolder i have several yaml files broken into ie. irrigation_globals.yaml, irrigation_scripts.yaml, irrigation_automations.yaml etc.

Just the way i decided to work.

I thought of renaming all the yaml files into something else but in some cases it’s 8 or 9 files in each folder.

IMHO, that kind of defeats the entire purpose of using packages in the first place.

Packages were designed with the intention that all of the various pieces of code for that function could all be included in one yaml file.

You normally would just include all sensors, automations, scripts, globals, etc into the same package and just call it irrigation.yaml.

But… but… they are very nice and tidy now :frowning:

I think they would be even more tidy if you combined all of the code/functions for each system into one yaml file. That way you don’t have to keep track of and open multiple files to make modifications to the system.

It’s a one-stop-shop yaml file for your irrigation system. :wink: