Integrations

Update

Spook adds actions that install every update that has one in a single go, and that get the release notes of updates in an automation.

The update integration shows what can be updated in Home Assistant: its apps, integrations from HACS, the firmware of devices. Each as an update entity, on when there is an update waiting.

Home Assistant's own install action is made for one update at a time, though. Aim it at a label or at everything, and one update in it that is up to date fails the whole call. Aim it at an area or a device, and it passes over the updates in it altogether: those only bring their main entities along, and an update entity is a configuration or diagnostic entity. And the release notes the update dialog shows are out of reach for an automation.

Spook adds two actions for that: install everything that has an update, and get the release notes.

Actions

Spook adds two actions to the update integration. You find them wherever you add an action, marked with a 👻. Both are for administrators only, as Home Assistant's own install and its release notes are.

Install all updates

Installs every update in the target that has one. One at a time, sorted by entity ID, so the same call goes the same way every time.

The target is any action target: update entities, devices, areas, floors and labels, with an exclude. An area or a device brings its update entities along. In YAML, entity_id: all is every update there is.

Each install goes through Home Assistant's own install action, with its own checks. What has nothing to install is skipped, not an error:

  • An update that is up to date, or whose latest version you skipped.
  • An update that is being installed right now.
  • An update that is unavailable, or does not know its versions.
  • An update that only tells a new version is out, and cannot be installed from Home Assistant.

The updates of Home Assistant itself, its operating system and the Supervisor are always skipped. They restart Home Assistant or the machine halfway, which would cut the action off with the rest still to do. Install those on the updates page, or with Home Assistant's own install action, last. Spook recognizes them by what the Supervisor integration made, so renaming their entity IDs does not change that. Apps are installed like any other update.

With Backup on, every update that can make a backup first does. The others install without one, and the response says which got a backup.

One install failing does not stop the rest. What happens next depends on whether you ask for the response:

  • With a response variable, nothing is raised. The response lists what was installed, what failed and why, and what was skipped and why. Check it in your automation.
  • Without one, nobody would see a failure. So once everything else had its turn, the action fails with an error that names each update that failed, and why.

A target without a single update entity is refused with an error.

How to use it

  1. Open the automation or script that should install the updates, and select Add action.
  2. Search for install all, and select Update: Install all updates 👻.
  3. Under Targets, choose the updates, like a label you gave them.
  4. Turn on Backup if you want a backup before each install.
  5. Select Save.

Get release notes

Gets the release notes of one or more updates: the full ones the update dialog shows, with the installed and latest version, the short summary and the link to the release. To read before installing, or to send along in a notification.

The target is any action target, like for Install all updates. The response holds every update entity in it, under its entity ID.

Not every update has full release notes. Those get the summary and the link, and no notes. An update that is unavailable is not asked, and the response says it is not available. Release notes are often fetched from the internet: when that fails for one update, its error says why, and the others are still there.

How to use it

  1. Open the automation or script that needs the release notes, and select Add action.
  2. Search for release notes, and select Update: Get release notes 👻.
  3. Under Targets, choose the updates.
  4. Under Response variable, give the release notes a name, like notes. The steps after this one can use it.
  5. Select Save.

Missing something here?

An action, an entity or a repair this integration should have? Say so. Stuck, or found a bug? There is help.