diff --git a/src/panels/config/backup/components/overview/ha-backup-overview-summary.ts b/src/panels/config/backup/components/overview/ha-backup-overview-summary.ts index 522517870c71..eee4fef45327 100644 --- a/src/panels/config/backup/components/overview/ha-backup-overview-summary.ts +++ b/src/panels/config/backup/components/overview/ha-backup-overview-summary.ts @@ -119,6 +119,10 @@ class HaBackupOverviewBackups extends LitElement { `; } + const nextBackupDescription = this._nextBackupDescription( + this.config.schedule.state + ); + if (!lastSuccessfulBackup) { return html` + + + + ${nextBackupDescription} + + `; } - const nextBackupDescription = this._nextBackupDescription( - this.config.schedule.state - ); - const numberOfDays = differenceInDays( // Subtract a few hours to avoid showing as overdue if it's just a few hours (e.g. daylight saving) addHours(now, -OVERDUE_MARGIN_HOURS), - lastSuccessfulBackupDate + new Date(lastSuccessfulBackup.date) ); const isOverdue =