Skip to content

Commit

Permalink
Add warning when no backup location is selected (#23550)
Browse files Browse the repository at this point in the history
* Add warning when no backup location is selected

* Move to bottom
  • Loading branch information
bramkragten committed Jan 2, 2025
1 parent 64ad37e commit be96794
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/panels/config/backup/ha-config-backup-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { nextRender } from "../../../common/util/render-status";
import "../../../components/ha-button";
import "../../../components/ha-card";
import "../../../components/ha-icon-next";
import "../../../components/ha-alert";
import "../../../components/ha-password-field";
import type { BackupConfig } from "../../../data/backup";
import { updateBackupConfig } from "../../../data/backup";
Expand Down Expand Up @@ -134,6 +135,14 @@ class HaConfigBackupSettings extends LitElement {
.cloudStatus=${this.cloudStatus}
@value-changed=${this._agentsConfigChanged}
></ha-backup-config-agents>
${!this._config.create_backup.agent_ids.length
? html`<ha-alert
alert-type="warning"
title="No location selected"
>You have to select at least one location to create a
backup.</ha-alert
><br />`
: nothing}
</div>
</ha-card>
<ha-card>
Expand Down

0 comments on commit be96794

Please sign in to comment.