Hi.
I try to package HA for a kind of selfhosting app store of a service I am building. For that, some custom configuration is needed (trusted proxies and networks). However, modifying the configuration.yml
after HA starts is not possible in my situation, so the modified config must exist right from the first start of the application. I am having problems setting this up.
What I tried:
I create a directory /config
and put a configuration.yml
in there. It is the same that is generated initially but with some additional entries.
I started HA in docker and mounted my /config
directory to the container’s /config
directory.
HA prints an error: ERROR (MainThread) [homeassistant.bootstrap] Failed to parse configuration.yaml: in "/config/configuration.yaml", line 13, column 13: Unable to read file /config/automations.yaml.. Activating safe mode
and only log files are created in the /config
dir, nothing else.
I suspect that HA can handle an empty /config
dir by generating initial config files - and a /config
dir which is already populated with config files. But it fails if only part of it exists.
However, that means the only way to customize configuration is after the first run, when there are files that can be customized. Is there some other way to provide initial custom configuration that is added to the one that is generated on first startup?
Or can I provide configuration through environment variables? That would help, too.