Since some days I am getting errors in my config -
I don’t know what to do. I have split up my config as @Frenck did it moving a lot of stuff into my package folder… I worked like a charm. But now I got lost … not knowing where to look for…
Here’s my configuration.yaml:
And one more thing:
Obviously I have an error in an automation… (which is basically located in my automations folder, but also sits in i.e. the irrigation package.
The error is: ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: invalid template (TemplateSyntaxError: unexpected char "'" at 10) for dictionary value @ data['action'][1]['data_template']['value']. Got None. (See ?, line ?).
To figure out which automation is giving you trouble start commenting them out, one after another, until the error goes away. The last one you commented out will contain the error. Then post that automation so someone can look at it for you.
Thanks for that hint… I went through all my automations (30!) and found the one, that messed up. Somehow I must have deleted a ’ ’ ’ char… Now trying to figure out why my configuration does not load properly…
Just on a side note, why are you even using packages? I doesn’t look very organized to me. Sorry, no offence.
Packages should be a second way, to declutter your config, but if you use packages, you should use them more “in itself”.
What you’re doing, is moving everything to a package file, that isn’t necessary and won’t work in your favor. What you would like to do, is put things together and bundle up a nice package. Frenck btw doesn’t even use packages. And last but ot least, I’m quite sure, you don’t even use packages correctly, as iirc a package file needs to end with _package.yaml.
Right now you’re simply moving the files from the root directory to a subfolder called packages.
Why am I saying this: I get the feeling, you’re not familiar with splitting config files and use packages. Maybe it would help to get the idea behind package files and then start again, taking advantage of package files as intended.
If this sounds interesting to you, just let me know, so I’ll post my idea of using packages.
Hi @paddy0174,
thanks for the hint … and I don’t feeling offended What @frenck is concerned: I just dived into a config that can be found in here: Frenck’s config sample which is probably not the one he still uses and adopted lot of that stuff… maybe based on older insights…
I just wanted to reduce the size of the configuration.yaml entries by moving the typical parts out of it and moved all of that stuff to my “packages” folder which is loaded automatically. Some of the files in there point to other folders in my config also there loading subsequent files and folders. But you are right, that some of those are quiet “dumb” and only reference a single config entry like “logbook:”… I started with the creation of the packages folder, because I integrated the irrigation implementation of @kloggy into my smarthome. This one for sure is a package with its own automations, scripts, etc..
So what would you recommend? Moving all those dumb parts back to configuration.yaml?
The irrigation one is an example of a package. For your “base” configuration, I’d suggest splitting out the major domains into either their own file, or files within a folder. I have sensors and automations in separate files in subfolders, (via !include_dir_merge_list (docs)) with smaller domains such as binary_sensors currently in a single file: