Don't use state if only one view

This commit is contained in:
Paul Bottein
2025-11-07 17:48:20 +01:00
parent 1a14e08f12
commit d45b2ec5c1
3 changed files with 3 additions and 9 deletions

View File

@@ -25,8 +25,6 @@ class PanelClimate extends LitElement {
@property({ type: Boolean, reflect: true }) public narrow = false; @property({ type: Boolean, reflect: true }) public narrow = false;
@state() private _curView = 0;
@state() private _lovelace?: Lovelace; @state() private _lovelace?: Lovelace;
@state() private _searchParms = new URLSearchParams(window.location.search); @state() private _searchParms = new URLSearchParams(window.location.search);
@@ -114,7 +112,7 @@ class PanelClimate extends LitElement {
.hass=${this.hass} .hass=${this.hass}
.narrow=${this.narrow} .narrow=${this.narrow}
.lovelace=${this._lovelace} .lovelace=${this._lovelace}
.curView=${this._curView} .curView=${0}
></hui-lovelace> ></hui-lovelace>
` `
: nothing} : nothing}

View File

@@ -25,8 +25,6 @@ class PanelLight extends LitElement {
@property({ type: Boolean, reflect: true }) public narrow = false; @property({ type: Boolean, reflect: true }) public narrow = false;
@state() private _curView = 0;
@state() private _lovelace?: Lovelace; @state() private _lovelace?: Lovelace;
@state() private _searchParms = new URLSearchParams(window.location.search); @state() private _searchParms = new URLSearchParams(window.location.search);
@@ -114,7 +112,7 @@ class PanelLight extends LitElement {
.hass=${this.hass} .hass=${this.hass}
.narrow=${this.narrow} .narrow=${this.narrow}
.lovelace=${this._lovelace} .lovelace=${this._lovelace}
.curView=${this._curView} .curView=${0}
></hui-lovelace> ></hui-lovelace>
` `
: nothing} : nothing}

View File

@@ -25,8 +25,6 @@ class PanelSecurity extends LitElement {
@property({ type: Boolean, reflect: true }) public narrow = false; @property({ type: Boolean, reflect: true }) public narrow = false;
@state() private _curView = 0;
@state() private _lovelace?: Lovelace; @state() private _lovelace?: Lovelace;
@state() private _searchParms = new URLSearchParams(window.location.search); @state() private _searchParms = new URLSearchParams(window.location.search);
@@ -114,7 +112,7 @@ class PanelSecurity extends LitElement {
.hass=${this.hass} .hass=${this.hass}
.narrow=${this.narrow} .narrow=${this.narrow}
.lovelace=${this._lovelace} .lovelace=${this._lovelace}
.curView=${this._curView} .curView=${0}
></hui-lovelace> ></hui-lovelace>
` `
: nothing} : nothing}