It would be great to be able to specify the version number of an add-on when installing.
Currently, the API consist in a request to the following url:
POST https://<hostname>/api/hassio/addons/<addon_slug>/install
with a json-empty payload {}
.
It would be great to be able to specify the version number in the payload like that:
{"version": "0.1.2"}
Since the version is simply translated into a repository tag, it would simply request this tag instead of the one supplied in the config.json
file. Obviously, it can only work with pre-built docker images, but it would allow the following scenarios:
- Downgrade a faulty add-on to a known good version without loosing the settings.
- QA test a new published version before updating the
config.json
of the add-on on Github. - Give users a way to test special builds for feature branches, etc…
Obviously, it should be also available on the update endpoint:
POST https://<hostname>/api/hassio/addons/<addon_slug>/update
.
ANYWAY it’s already “kind-of” available when you’re restoring a package from a backup… just let us do as if it were restored from a backup.
After that we can add the following hassio
's CLI parameter:
hassio addons update superaddon --version 1.2.3
It could/should be an advanced feature only available on command-line.
Anybody else interested in this feature?