From 25986f239e513004fc280e922da78fd830b6c5ef Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 31 May 2023 12:35:38 +0200 Subject: [PATCH] Blueprints: show error in alert dialog when clicked (#16684) --- src/panels/config/blueprint/ha-blueprint-overview.ts | 6 ++++++ src/translations/en.json | 1 + 2 files changed, 7 insertions(+) diff --git a/src/panels/config/blueprint/ha-blueprint-overview.ts b/src/panels/config/blueprint/ha-blueprint-overview.ts index ea795b3cd2..0cbc479f48 100644 --- a/src/panels/config/blueprint/ha-blueprint-overview.ts +++ b/src/panels/config/blueprint/ha-blueprint-overview.ts @@ -321,6 +321,12 @@ class HaBlueprintOverview extends LitElement { (b) => b.path === ev.detail.id ); if (blueprint.error) { + showAlertDialog(this, { + title: this.hass.localize("ui.panel.config.blueprint.overview.error", { + path: blueprint.path, + }), + text: blueprint.name, + }); return; } this._createNew(blueprint); diff --git a/src/translations/en.json b/src/translations/en.json index 769a10dd3f..2b06405594 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -2637,6 +2637,7 @@ "automation": "automations", "script": "scripts" }, + "error": "{path} could not be loaded", "blueprint_in_use_title": "This blueprint is in use, and can not be deleted", "blueprint_in_use_text": "Please remove all below {type} that use this blueprint before deleting it. {list}", "blueprint_in_use_view": "view {type}",