Handle url error better when invalid blueprint url is provided (#21778)

* Encode spaces again

* Prettier

* Update src/panels/my/ha-panel-my.ts

* Remove the specific contents

* Remove the error keys, assign error immediately

* Revert "Remove the error keys, assign error immediately"

This reverts commit 27381ff250204dc0940cd5ff1b69f441d1fdb484.
This commit is contained in:
Simon Lamon 2024-09-23 15:28:57 +02:00 committed by GitHub
parent 3c48559df6
commit e72356033c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -432,6 +432,9 @@ class HaPanelMy extends LitElement {
>`,
});
break;
case "url_error":
error = this.hass.localize("ui.panel.my.url_error");
break;
default:
error = this.hass.localize("ui.panel.my.error") || "Unknown error";
}

View File

@ -1852,6 +1852,7 @@
"component_not_loaded": "This redirect is not supported by your Home Assistant instance. You need the integration {integration} to use this redirect.",
"no_supervisor": "This redirect is not supported by your Home Assistant installation. It needs either the Home Assistant Operating System or Home Assistant Supervised installation method. For more information, see the {docs_link}.",
"not_app": "This redirect only works from a mobile device that has the Home Assistant Companion app installed. {link}.",
"url_error": "The provided URL is invalid.",
"documentation": "documentation",
"download_app": "Click here to download the app",
"faq_link": "My Home Assistant FAQ",