From 92a9ed7080b0f68699200cfefda6af56d5d31e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Thu, 10 Feb 2022 10:29:42 +0100 Subject: [PATCH] Create error when trying to backup wile system in freeze (#11634) Co-authored-by: Bram Kragten --- .../src/update-available/update-available-card.ts | 14 +++++++------- src/translations/en.json | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/hassio/src/update-available/update-available-card.ts b/hassio/src/update-available/update-available-card.ts index 5012d61567..fce6b76927 100644 --- a/hassio/src/update-available/update-available-card.ts +++ b/hassio/src/update-available/update-available-card.ts @@ -192,13 +192,7 @@ class UpdateAvailableCard extends LitElement { ` : ""} - + ${this.supervisor.localize("common.update")} @@ -360,8 +354,14 @@ class UpdateAvailableCard extends LitElement { } private async _update() { + if (this._shouldCreateBackup && this.supervisor.info.state === "freeze") { + this._error = this.supervisor.localize("backup.backup_already_running"); + return; + } + this._error = undefined; this._updating = true; + try { if (this._updateType === "addon") { await updateHassioAddon( diff --git a/src/translations/en.json b/src/translations/en.json index f716a7e9fb..6668462050 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -4514,7 +4514,8 @@ "confirm_password": "Confirm backup password", "password_protection": "Password protection", "enter_password": "Please enter a password.", - "passwords_not_matching": "The passwords does not match" + "passwords_not_matching": "The passwords does not match", + "backup_already_running": "A backup or restore is already running, creating a new backup is currently not possible, try again later." }, "dialog": { "network": {