Add warning when no backup location is selected (#23550)

* Add warning when no backup location is selected

* Move to bottom
This commit is contained in:
Bram Kragten 2025-01-02 15:13:42 +01:00
parent 64ad37ed6a
commit be967940a2

View File

@ -8,6 +8,7 @@ import { nextRender } from "../../../common/util/render-status";
import "../../../components/ha-button"; import "../../../components/ha-button";
import "../../../components/ha-card"; import "../../../components/ha-card";
import "../../../components/ha-icon-next"; import "../../../components/ha-icon-next";
import "../../../components/ha-alert";
import "../../../components/ha-password-field"; import "../../../components/ha-password-field";
import type { BackupConfig } from "../../../data/backup"; import type { BackupConfig } from "../../../data/backup";
import { updateBackupConfig } from "../../../data/backup"; import { updateBackupConfig } from "../../../data/backup";
@ -134,6 +135,14 @@ class HaConfigBackupSettings extends LitElement {
.cloudStatus=${this.cloudStatus} .cloudStatus=${this.cloudStatus}
@value-changed=${this._agentsConfigChanged} @value-changed=${this._agentsConfigChanged}
></ha-backup-config-agents> ></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> </div>
</ha-card> </ha-card>
<ha-card> <ha-card>