Skip to content

Commit

Permalink
Close restore dialog if done (#23566)
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten authored Jan 3, 2025
1 parent 1faf024 commit 3ff5b83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/panels/config/backup/dialogs/dialog-restore-backup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/panels/config/backup/ha-config-backup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 3ff5b83

Please sign in to comment.