Close restore dialog if done (#23566)

This commit is contained in:
Bram Kragten 2025-01-03 11:17:40 +01:00 committed by GitHub
parent 1faf024c5b
commit 3ff5b832bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -212,6 +212,9 @@ class DialogRestoreBackup extends LitElement implements HassDialog {
private _subscribeBackupEvents() {
this._unsub = subscribeBackupEvents(this.hass!, (event) => {
if (!this._error && event.manager_state === "idle") {
this.closeDialog();
}
if (event.manager_state !== "restore_backup") {
return;
}

View File

@ -33,7 +33,7 @@ declare global {
class HaConfigBackup extends SubscribeMixin(HassRouterPage) {
@property({ attribute: false }) public hass!: HomeAssistant;
@property({ attribute: false }) public cloudStatus!: CloudStatus;
@property({ attribute: false }) public cloudStatus?: CloudStatus;
@property({ type: Boolean }) public narrow = false;