[HASS.IO] [API] Specify version for add-on install

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:

  1. Downgrade a faulty add-on to a known good version without loosing the settings.
  2. QA test a new published version before updating the config.json of the add-on on Github.
  3. 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?

I would very much appreciate this feature

YES! Just installed breaking add-on update, I WANT rollback!

In this way I solved the problem of downgrading an add-on

it can be useful?

1 Like

Yea, MQTT 5.1.1 is broken and I’m having issues downgrading… This would be helpful

3 Likes

+1

I needed to install older UniFi Network add-on for legacy UAP.

Here is my approach:

  1. Download ZIP with the older add-on version
  2. Copy it into /addons and unzip (I uploaded it using VSCode add-on and then just unzip from the Terminal & SSH addon)
  3. Go to add-on store, open the three-dots menu (top right corner) and click Check for updates
  4. You should see new Local add-ons section
  5. Install the add-on