diff --git a/src/panels/lovelace/hui-root.ts b/src/panels/lovelace/hui-root.ts index e574a842f1..8867c59097 100644 --- a/src/panels/lovelace/hui-root.ts +++ b/src/panels/lovelace/hui-root.ts @@ -747,10 +747,10 @@ class HUIRoot extends LitElement { if (curViewConfig?.back_path) { navigate(curViewConfig.back_path); - } else if (history.length > 0) { + } else if (history.length > 1) { history.back(); } else { - navigate(views[0].path!); + navigate(this.route!.prefix); } }