mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-08 18:06:29 +00:00
Add note about removing options (#1953)
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
fd87cac674
commit
0fae3776e1
@ -115,7 +115,9 @@ map:
|
||||
image: repo/{arch}-my-custom-addon
|
||||
```
|
||||
|
||||
Note: Avoid the use of this filename for anything other than add-on configuration, as the Supervisor does a recursive lookup.
|
||||
:::note
|
||||
Avoid using `config.yaml` as filename in your add-on for anything other than the add-on configuration. The Supervisor does a recursively search for `config.yaml` in the add-on repository.
|
||||
::
|
||||
|
||||
### Required configuration options
|
||||
|
||||
@ -210,6 +212,13 @@ size: 15
|
||||
count: 1.2
|
||||
```
|
||||
|
||||
::note
|
||||
If you remove a configuration option from an add-on already deployed to users, it is recommended to delete the option to avoid a warning like `Option '<options_key>' does not exist in the schema for <Add-on Name> (<add-on slug>)`.
|
||||
|
||||
To remove an option the Supervisor addons API can be used. Using bashio this boils down to `bashio::addon.option '<options_key>'` (without additional argument to delete this option key). Typically this should be called inside an if block checking if the option is still set using `bashio::config.exists '<options_key>'`.
|
||||
::
|
||||
|
||||
|
||||
The `schema` looks like `options` but describes how we should validate the user input. For example:
|
||||
|
||||
```yaml
|
||||
|
Loading…
x
Reference in New Issue
Block a user