From 654e74294d73df40c56a38fda55fee9ee5d65a7d Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Wed, 27 Jun 2018 14:18:58 -0400 Subject: [PATCH] Default view (#1349) * Do not rebuild config twice on tab change * Allow setting default page --- src/layouts/home-assistant-main.js | 2 +- src/panels/lovelace/hui-root.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/layouts/home-assistant-main.js b/src/layouts/home-assistant-main.js index 58aea5f00c..782f245c30 100644 --- a/src/layouts/home-assistant-main.js +++ b/src/layouts/home-assistant-main.js @@ -111,7 +111,7 @@ class HomeAssistantMain extends NavigateMixin(EventsMixin(PolymerElement)) { super.connectedCallback(); window.removeInitMsg(); if (document.location.pathname === '/') { - this.navigate('/states', true); + this.navigate(`/${localStorage.defaultPage || 'states'}`, true); } } diff --git a/src/panels/lovelace/hui-root.js b/src/panels/lovelace/hui-root.js index 43e6288fa2..8a7537b200 100644 --- a/src/panels/lovelace/hui-root.js +++ b/src/panels/lovelace/hui-root.js @@ -149,7 +149,6 @@ class HUIRoot extends NavigateMixin(EventsMixin(PolymerElement)) { if (index !== this._curView) { const id = this.config.views[index].id || index; this.navigate(`/lovelace/${id}`); - this._selectView(index); } }