Blueprints: show error in alert dialog when clicked (#16684)

This commit is contained in:
Bram Kragten 2023-05-31 12:35:38 +02:00 committed by GitHub
parent b586210ff1
commit 25986f239e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -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);

View File

@ -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}",