mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +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) {
|
if (!this._config || !this._hass) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const oldHass = changedProps.get("hass") as HomeAssistant | undefined;
|
const oldHass = changedProps.get("_hass") as HomeAssistant | undefined;
|
||||||
const oldConfig = changedProps.get("_config") as
|
const oldConfig = changedProps.get("_config") as
|
||||||
| EntitiesCardConfig
|
| EntitiesCardConfig
|
||||||
| undefined;
|
| undefined;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!oldHass ||
|
(changedProps.has("_hass") &&
|
||||||
!oldConfig ||
|
(!oldHass || oldHass.themes !== this._hass.themes)) ||
|
||||||
oldHass.themes !== this.hass.themes ||
|
(changedProps.has("_config") &&
|
||||||
oldConfig.theme !== this._config.theme
|
(!oldConfig || oldConfig.theme !== this._config.theme))
|
||||||
) {
|
) {
|
||||||
applyThemesOnElement(this, this._hass.themes, this._config.theme);
|
applyThemesOnElement(this, this._hass.themes, this._config.theme);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user