From d45b2ec5c18bcc232efa1d0c5704e63df409a1db Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Fri, 7 Nov 2025 17:48:20 +0100 Subject: [PATCH] Don't use state if only one view --- src/panels/climate/ha-panel-climate.ts | 4 +--- src/panels/light/ha-panel-light.ts | 4 +--- src/panels/security/ha-panel-security.ts | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/panels/climate/ha-panel-climate.ts b/src/panels/climate/ha-panel-climate.ts index 4de17d257a..4b6cd12d15 100644 --- a/src/panels/climate/ha-panel-climate.ts +++ b/src/panels/climate/ha-panel-climate.ts @@ -25,8 +25,6 @@ class PanelClimate extends LitElement { @property({ type: Boolean, reflect: true }) public narrow = false; - @state() private _curView = 0; - @state() private _lovelace?: Lovelace; @state() private _searchParms = new URLSearchParams(window.location.search); @@ -114,7 +112,7 @@ class PanelClimate extends LitElement { .hass=${this.hass} .narrow=${this.narrow} .lovelace=${this._lovelace} - .curView=${this._curView} + .curView=${0} > ` : nothing} diff --git a/src/panels/light/ha-panel-light.ts b/src/panels/light/ha-panel-light.ts index 06fe143a08..020c53428a 100644 --- a/src/panels/light/ha-panel-light.ts +++ b/src/panels/light/ha-panel-light.ts @@ -25,8 +25,6 @@ class PanelLight extends LitElement { @property({ type: Boolean, reflect: true }) public narrow = false; - @state() private _curView = 0; - @state() private _lovelace?: Lovelace; @state() private _searchParms = new URLSearchParams(window.location.search); @@ -114,7 +112,7 @@ class PanelLight extends LitElement { .hass=${this.hass} .narrow=${this.narrow} .lovelace=${this._lovelace} - .curView=${this._curView} + .curView=${0} > ` : nothing} diff --git a/src/panels/security/ha-panel-security.ts b/src/panels/security/ha-panel-security.ts index f59766bdac..79ee64fd77 100644 --- a/src/panels/security/ha-panel-security.ts +++ b/src/panels/security/ha-panel-security.ts @@ -25,8 +25,6 @@ class PanelSecurity extends LitElement { @property({ type: Boolean, reflect: true }) public narrow = false; - @state() private _curView = 0; - @state() private _lovelace?: Lovelace; @state() private _searchParms = new URLSearchParams(window.location.search); @@ -114,7 +112,7 @@ class PanelSecurity extends LitElement { .hass=${this.hass} .narrow=${this.narrow} .lovelace=${this._lovelace} - .curView=${this._curView} + .curView=${0} > ` : nothing}