Configuration.yaml problem

Yes, you have to tell the config where the files are if they are in a different directory.

This is part of my config yaml

history: !include includes/history.yaml
logbook: !include includes/logbook.yaml
device_tracker: !include includes/device_tracker.yaml
cover: !include includes/cover.yaml
sensor: !include_dir_merge_list sensors
binary_sensor: !include_dir_merge_list binary_sensors
media_player: !include includes/media_players.yaml
group: !include_dir_merge_named groups
switch: !include_dir_merge_list switches
light: !include_dir_merge_list lights
script: !include scripts.yaml
climate: !include includes/climate.yaml
camera: !include_dir_merge_list cameras
alarmdecoder: !include includes/alarmdecoder.yaml
alarm_control_panel: !include includes/alarmcpanel.yaml
shopping_list:
input_boolean: !include includes/input_boolean.yaml
input_select: !include includes/input_select.yaml
recorder: !include includes/db.yaml
tts: !include includes/tts.yaml
google_assistant: !include includes/gassist.yaml
influxdb:
2 Likes

Which are all sub-directories of config. Right ???

I haven’t tried it yet. but do I understand correct that (if i copy your way) I should add a file named “includes” and in that folder I should add the rest of the files? eg history.yaml?
and one more please.
how do I create the history.yaml file with configurator?

Yes.

Everything is assumed to be a subdirectory of your base config. If you’re using hassio or home assistant docker, that full PWD is /config, so my files and directories are located in /config

You can do whatever you like. You can name the directory hefeweisen if you like. It doesn’t matter. You don’t have to put them in subdirectories if you don’t want. You can leave them in the root of the config directory. The thing about it is, if you stick them in directories, your configuration yaml has to know that the file it is looking for is in that subdirectory.

No idea. I don’t use hassio or a configurator.

Strange, I use home assistant docker and my base path is called /configuration and in this path is the configuration.yaml and a folder config, and in the folder config are all my other files.

As you can see here:

Then you have told home assistant to use the path /configuration for your docker run. The DEFAULT docker image looks at /config, per the documentation.

What does your dev tools info page say?

image

It shows the same as yours with
Path to configuration.yaml: /config

It’s probably configured as for /configuration in my docker-compose file, which I don’t have at hand right now.

Then your FULL PATH is /config.

Sounds like you have /configuration on the host? If that’s the case, it means nothing in the docker container.

So, your files are in /config/config

1 Like

Ah now I understand! Stupid me, you are right, I mapped the volume /configuration to /config in the docker-compose file and if I commit it to Github it will take the name from my volume. Thanks for the insights!

1 Like

Yep. So if we refer to /config this is talking about the file structure in relation to how Home Assistant is reading the full path.