I decided to start as I would in any programming language spliting logical chunks into seperate files. All seemed simple I thought use something like
myfile: !include myfiles.yaml
and that would include the myfiles.yaml file and add the stuff inside. Well it doesn’t and I really cannot see why. The file exists it is in the same directory as the configuration.yaml file yet it does not get included. All I get is “integration xxxx not found” when I run the checks. I’ve tried it in and out of directories and I just cannot figure out why I cannot even achieve including a file. All of the other includes seem to work i.e. groups.
I read the trouble shooting advice. Look at HomeAssistant.log. Can’t find that one, found a log in the development bit of hassio, that had nothing in though. Read the next bit access with SSH. Installed the plugin. Not allowed to connect to it.
I just want to include a file. Where am I going wrong here as it really is not obvious to me. I’ve probably been banging my head on it for too long and cannot see the obvious so please put me straight.
Then any file in <config>/packages are effectively included they way you’re thinking. E.g., if I had a file named <config>/packages/package1.yaml, it could contain things like:
Ah that makes sense, and it sounds like packages are what I need to be using. I’m just trying not to end up with a configuration file that is totally enormous and would prefer to break it down into logical chunks.
The articles I read on this did not make that very clear at all. So I’m off to give packages a go.
Packages work (I have a lot of them), but you might have gotten the syntax wrong. Feel free to share what you’ve done here and maybe we can spot the problem.
Your second attempt (with remote: !include remotes.yaml) probably didn’t work because you didn’t have the syntax correct. E.g., I suspect this is what you have in configuration.yaml:
If you want to split that up using packages, you should be able to copy that exact code into a package file. Or, with your other layout (using remote: !include remotes.yaml), remotes.yaml should contain:
- platform: harmony
name: harmony
host: 10.0.20.4
BTW, when you post YAML code you really need to format it properly so we can read it correctly.
Ah, I figured that the - was just how the platform: was split from remote: learning Yaml on the fly is not as straightforward as I thought
I got that working and then discovered that the remote already existed. No idea what is bringing it into existence, i found it in the developer bit when looking for help with what was going wrong. I feel like I am just barely in control of HA. Thanks for the help with it. This is just the first thing I was trying to get working. I have a house full of lightwaveRF stuff run currently from domoticz that I want to bring over. Thought I’d start simple though and keep it clean
This is how basic my setup is so far, it is literally straight from install with the customize.yaml added as it was missing and the package down the bottom.
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
# base_url: example.duckdns.org:8123
# Text to speech
tts:
- platform: google_translate
homeassistant:
customize: !include customize.yaml
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
package: !include_dir_named larch
person:
I have a directory called larch directly in config. Right now it has no yaml files in it though.
If I don’t comment the package line out I get
Configuration validation
Validate your configuration if you recently made some changes to your configuration and want to make sure that it is all valid
Configuration invalid
Component error: package - Integration package not found
People can, you can’t yet because you don’t know what you’re doing so best to stick with convention for now until you learn enough to customize your configuration to your wildest desires.
Yeah, sounds logical. Yaml is all very illogical and picky to me at this point. Too many years spent with C type languages Like a challenge though. Thank you very much for the help.