diff --git a/src/panels/config/backup/dialogs/dialog-restore-backup.ts b/src/panels/config/backup/dialogs/dialog-restore-backup.ts index 7fc8d26426..ecf6a6f156 100644 --- a/src/panels/config/backup/dialogs/dialog-restore-backup.ts +++ b/src/panels/config/backup/dialogs/dialog-restore-backup.ts @@ -55,6 +55,8 @@ class DialogRestoreBackup extends LitElement implements HassDialog { @state() private _userPassword?: string; + @state() private _usedUserInput = false; + @state() private _error?: string; @state() private _state?: RestoreBackupState; @@ -70,6 +72,7 @@ class DialogRestoreBackup extends LitElement implements HassDialog { this._formData = INITIAL_DATA; this._userPassword = undefined; + this._usedUserInput = false; this._error = undefined; this._state = undefined; this._stage = undefined; @@ -94,6 +97,7 @@ class DialogRestoreBackup extends LitElement implements HassDialog { this._params = undefined; this._backupEncryptionKey = undefined; this._userPassword = undefined; + this._usedUserInput = false; this._error = undefined; this._state = undefined; this._stage = undefined; @@ -159,15 +163,24 @@ class DialogRestoreBackup extends LitElement implements HassDialog { } private _renderEncryption() { - return html`
- ${this._userPassword - ? "The provided encryption key was incorrect, please try again." - : this._backupEncryptionKey - ? "The backup is encrypted with a different key or password than that is saved on this system. Please enter the key for this backup." - : "The backup is encrypted. Provide the encryption key to decrypt the backup."} -
+ return html`${this._usedUserInput + ? "The provided encryption key was incorrect, please try again." + : this._backupEncryptionKey + ? html`The Backup is encrypted with a different encryption key than + that is saved on this system. Please enter the encryption key for + this backup.