diff --git a/cast/src/receiver/layout/hc-lovelace.ts b/cast/src/receiver/layout/hc-lovelace.ts index d106579609..0be9488a54 100644 --- a/cast/src/receiver/layout/hc-lovelace.ts +++ b/cast/src/receiver/layout/hc-lovelace.ts @@ -52,10 +52,11 @@ class HcLovelace extends LitElement { protected updated(changedProps) { super.updated(changedProps); + if (changedProps.has("viewPath") || changedProps.has("lovelaceConfig")) { const index = this._viewIndex; - if (index) { + if (index !== undefined) { this.shadowRoot!.querySelector("hui-view")!.style.background = this.lovelaceConfig.views[index].background || this.lovelaceConfig.background ||