Update a HACS repository
hacs_update_hacs_repositoryUpdate an installed HACS repository when a pending upgrade exists: refresh repository data, read the available version, then download and install it over WebSocket.
Instructions
Update an installed HACS repository to its latest available version.
HACS has no single "update" WebSocket command. This performs the three
calls HACS's own frontend makes for an update: hacs/repository/refresh
(re-fetches repository data; always returns {}, no version info),
then hacs/repository/info (reads the resulting available_version),
then hacs/repository/download with that version — which downloads and
installs the newest release over the network; the previous version is
only recoverable from a backup taken beforehand.
Use when: pending_upgrade is set for the repository (see
hacs_list_hacs_critical_updates) and the new version should be
applied.
Not for: pinning a specific version instead of the latest — use
hacs_install_hacs_repository with version set.
Returns: HACS's download result, or {"error": ..., "hint": ...} if
any of the three WebSocket calls fails.
Errors: {"error": str(exception), "hint": "HACS may not be installed, or the WS command name has changed"} when the refresh or info call
fails (the download call is then never made); {"error": "HACS did not report an available_version for this repository", "raw": ...} when
info succeeds but has nothing to update to.
Limits: downloads the new release over the network; no automatic
rollback on failure; three sequential WebSocket round-trips instead of
one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_id | Yes | HACS repository id to update, e.g. from `hacs_list_hacs_repositories`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |