mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 01:06:35 +00:00
Fix theme updating entities card (#10979)
This commit is contained in:
parent
25ff5fef14
commit
e2af8ac3cc
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user