Improve description of addon_configs folder name (#2324)

This commit is contained in:
Einschmidt 2024-10-26 16:24:20 +02:00 committed by GitHub
parent d616ef12fa
commit 9916c0db53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -320,7 +320,8 @@ Sometimes add-on developers may want to allow users to configure to provide thei
2. Internal service requires a binary file or some file configured externally as part of its config.
3. Internal service supports live reloading on config change and you want to support that for some or all of its configuration by asking users for a file in its schema to live reload from.
In cases like these you should add `addon_config` to `map` in your addon's configuration file. And then you should direct your users to put this file in the folder `/addon_configs/<your addon's slug>`. This folder will be mounted at `/config` inside your addon's docker container at runtime. You should either provide an option in your addon's schema that collects a relative path to the file(s) starting from this folder or rely on a fixed filename and include that in your documentation.
In cases like these you should add `addon_config` to `map` in your addon's configuration file. And then you should direct your users to put this file in the folder `/addon_configs/{REPO}_<your addon's slug>`. If an add-on is installed locally, `{REPO}` will be `local`. If the add-on is installed from a Github repository, `{REPO}` is a hashed identifier generated from the GitHub repository's URL (ex: `https://github.com/xy/my_hassio_addons`).
This folder will be mounted at `/config` inside your addon's docker container at runtime. You should either provide an option in your addon's schema that collects a relative path to the file(s) starting from this folder or rely on a fixed filename and include that in your documentation.
Another use case of `addon_config` could be if your addon wants to provide file-based output or give users access to internal files for debugging. Some examples include: