Don't allow yaml dashboard to be in edit mode (#18879)

This commit is contained in:
Paul Bottein 2023-12-04 10:17:52 +01:00 committed by GitHub
parent cf00ac74c6
commit b273b31b03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -580,7 +580,7 @@ class HUIRoot extends LitElement {
const searchParams = extractSearchParamsObject();
if (searchParams.edit === "1") {
this._clearParam("edit");
if (this.hass!.user?.is_admin) {
if (this.hass!.user?.is_admin && this.lovelace!.mode === "storage") {
this.lovelace!.setEditMode(true);
}
} else if (searchParams.conversation === "1") {