Default_config, packages help

First off, I’m visually impaired and use a screen reader. I mention that, not for sympathy but in hopes that it will help eliminate the “rtfm” comments.

I am needing to get into some more advanced automations that can not be done in the ui. I’ve been reading, and listening to yt on packages and to be honest I’m quite frusterated……understatement of the year!

I was able to add a folder named “packages”, and add the homeassistant block with include packages in the configuration.yaml, easy peasy lemon squeezey.

Here’s where the frustration comes in, nothing I’ve been reading and listening to talks about “default_config”. Everything already had the homeassistant block and weren’t using the default_config already. Everything sounds so simple.

When I google up this default_config, I find a couple threads but they are all pretty much “rtfm”, “it never needs to be touched”, “just delete the line default_config, add everything back manually and hope you don’t brick it”….all quick one liners and links to the “official documentation”.

I guess I’m just dumb as a box of rocks, as I’ve read, and read, and read, just getting more confused along the way. I really don’t understand why this aspect seems to be pure black magic and only for the chosen few.

So here’s where I need help. Is there an easy (relatively) way to move beyond the “default_config” and into a more advanced/practical structure?

I’m using studio code server in HA and can’t figure out how to find, let alone read this mysterious default_config. For example to save or copy from. This leads me to believe I have to use the cli to find it, and cat to read it, nano to edit it and so on. Where in the file structure is this default_config located?

Maybe my google skills are lacking, does anyone have any useful links (official or otherwise like yt) that explain this a little better?

Truly, any guidance is appreciated.

Not sure if this will help. I use only yaml, and like you I created a /packages directory under config where all of my yaml files go. Like you I included /packages in configuration.yaml.

I write yaml packages in Studio Code Server and put them in the packages directory with .yaml extension. On the left side of Studio Code server is a control that lets me see the packages directory and save there.

I use the Developer Tools “Check Configuration” button to make sure HA likes it at 10,000ft. Then I reload Automations, Helpers or scripts as related to the work I’m completing

Having said that, I’ve never run into a language as character position persnickety as yaml.

And you’re not alone in that it took my a while to get “my groove” on getting all of that to produce running code

1 Like

Generally speaking the “default_config” refers to a key/entry in your configuration.yaml file, unless you’ve removed it it is there by default… nothing else to do. Some folk like to remove it and add system configurations back in manually, I think it is a pointless exercise and just causes problems down the road.

If you just want to start using packages then it is not something you need to get hung up on. Check that your configuration.yaml file has the key “default_config:” (it is actually the first line in my configuration.yaml file) and carry on.

Personally whenever I read “default_config” I ignore it and move on.

1 Like

This sounds like a plan. So say I want to break things down into groups (splitting as they say), and have my own organization of groups, like sensors, etc… Does the default-config not have this data already (that I would have to move over)? I’m just worried about breaking thing or making a circular obstacle. If there’s nothing in there that I need to worry about, I’ll just leave it be an continue on with packages and groups for sensors and such.

I appreciate your comment, thank you. The documentation just isn’t that clear, or is outdated, or is just plain different from one search to another.

Nice. Did you leave the default_config alone and just add on below that in the configuration.yaml?

I understand you said you didn’t want any “rtfm” comments but I think that’s only way yuou’ll know what’s in default_config.

that page lists everything included in HA by the default_config entry.

it’s located in your config directory in the configuration.yaml file. as noted it’s usually the first line but it could be anywhere. You should have found it when you added the !include for your packages configuration. If you don’t have it then you either removed it or have been using HA for longer than the default_config entry has been around (not sure when that happened since I also have an older install and never put it in). If you don’t have it then you will have all of the entries that are included in default_config added individually in your configuration.yaml file.

I any case I’m not sure what the default_config has to do with packages? They are really related as far as I know unless you are misunderstanding how packages work.

for example here is my configuration.yaml from a test HA install that is almost bare bones default but that I’ve added packages to:


# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

homeassistant:
  packages: !include_dir_named packages

http:
  server_port: 8126
  

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

logger:
  default: warning
1 Like

All that default_config does is load a bunch of integrations that Home Assistant makes use of by default, as can be seen by the list on the page that finity linked to.

In the packages folder you can create as many files and folders to organise your own configurations as you please. Pretty much anything extra that would have gone into configuration.yaml can now go there, like scripts, automations, template sensors etc.

1 Like

Well at least your “rtfm” points to the correct page so thank you. Interestingly, all of the threads that I had stumbled across (with the same frustrations) had other links that were of no clarification and just more confusing. My searches with “default_config” (using the underscore) didn’t turn up this page either! I guess I should have tried dropping the underscore! Ha,

This at least makes sense to me. My concern was that there was already a structure of sorts for sensors and such that I would have had to pull out of that and move over to how I would personally like to organize things, Not being able to just click on the file tree in studio code server to read what was in “default_config” was my hang-up. It’s there but you can’t read it. Now that I know what’s in there, it’s obvious I don’t need to worry about it.

So in the end, the short “just leave it alone” comments (with no explanation) to others threads is the right answer!

Anyway, thank you for providing me the information I was looking for. Maybe I need to try a different browser/search engine as something this simple should have populated.

1 Like

You just needed to stop banging your head against the wall and ask here sooner ;).

1 Like

True dat, but I like to search a bit first. Problem is my search engine appears to be getting dumber (just like me, ha!). I don’t know if it’s from bot regurgitation flooding the algorithm or what, but something is afoot.

1 Like

Well, if you are using the AI help from the search engine, then indeed…

1 Like