From e2af8ac3cc3570dc7eb51753db7c9889c7d7faa0 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 20 Dec 2021 12:14:54 +0100 Subject: [PATCH] Fix theme updating entities card (#10979) --- src/panels/lovelace/cards/hui-entities-card.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/panels/lovelace/cards/hui-entities-card.ts b/src/panels/lovelace/cards/hui-entities-card.ts index 2e9cca12a4..d5bbd66b3d 100644 --- a/src/panels/lovelace/cards/hui-entities-card.ts +++ b/src/panels/lovelace/cards/hui-entities-card.ts @@ -163,16 +163,16 @@ class HuiEntitiesCard extends LitElement implements LovelaceCard { if (!this._config || !this._hass) { return; } - const oldHass = changedProps.get("hass") as HomeAssistant | undefined; + const oldHass = changedProps.get("_hass") as HomeAssistant | undefined; const oldConfig = changedProps.get("_config") as | EntitiesCardConfig | undefined; if ( - !oldHass || - !oldConfig || - oldHass.themes !== this.hass.themes || - oldConfig.theme !== this._config.theme + (changedProps.has("_hass") && + (!oldHass || oldHass.themes !== this._hass.themes)) || + (changedProps.has("_config") && + (!oldConfig || oldConfig.theme !== this._config.theme)) ) { applyThemesOnElement(this, this._hass.themes, this._config.theme); }