diff --git a/src/panels/lovelace/cards/hui-history-graph-card.ts b/src/panels/lovelace/cards/hui-history-graph-card.ts index e4576d1fcc..5546c3d7c9 100644 --- a/src/panels/lovelace/cards/hui-history-graph-card.ts +++ b/src/panels/lovelace/cards/hui-history-graph-card.ts @@ -151,10 +151,11 @@ export class HuiHistoryGraphCard extends LitElement implements LovelaceCard { } protected shouldUpdate(changedProps: PropertyValues): boolean { - if (changedProps.has("_stateHistory")) { - return true; - } - return hasConfigOrEntitiesChanged(this, changedProps); + return ( + hasConfigOrEntitiesChanged(this, changedProps) || + changedProps.size > 1 || + !changedProps.has("hass") + ); } protected updated(changedProps: PropertyValues) { diff --git a/src/panels/lovelace/cards/hui-media-control-card.ts b/src/panels/lovelace/cards/hui-media-control-card.ts index 04e8773237..38ee1eacec 100644 --- a/src/panels/lovelace/cards/hui-media-control-card.ts +++ b/src/panels/lovelace/cards/hui-media-control-card.ts @@ -330,7 +330,11 @@ export class HuiMediaControlCard extends LitElement implements LovelaceCard { } protected shouldUpdate(changedProps: PropertyValues): boolean { - return hasConfigOrEntityChanged(this, changedProps); + return ( + hasConfigOrEntityChanged(this, changedProps) || + changedProps.size > 1 || + !changedProps.has("hass") + ); } protected firstUpdated(): void { diff --git a/src/panels/lovelace/cards/hui-statistics-graph-card.ts b/src/panels/lovelace/cards/hui-statistics-graph-card.ts index a70785bfa7..7e98eb7dd3 100644 --- a/src/panels/lovelace/cards/hui-statistics-graph-card.ts +++ b/src/panels/lovelace/cards/hui-statistics-graph-card.ts @@ -129,10 +129,11 @@ export class HuiStatisticsGraphCard extends LitElement implements LovelaceCard { } protected shouldUpdate(changedProps: PropertyValues): boolean { - if (changedProps.has("_statistics")) { - return true; - } - return hasConfigOrEntitiesChanged(this, changedProps); + return ( + hasConfigOrEntitiesChanged(this, changedProps) || + changedProps.size > 1 || + !changedProps.has("hass") + ); } public willUpdate(changedProps: PropertyValues) { diff --git a/src/panels/lovelace/cards/hui-weather-forecast-card.ts b/src/panels/lovelace/cards/hui-weather-forecast-card.ts index 55654a06cf..4dbe071b45 100644 --- a/src/panels/lovelace/cards/hui-weather-forecast-card.ts +++ b/src/panels/lovelace/cards/hui-weather-forecast-card.ts @@ -155,7 +155,8 @@ class HuiWeatherForecastCard extends LitElement implements LovelaceCard { protected shouldUpdate(changedProps: PropertyValues): boolean { return ( hasConfigOrEntityChanged(this, changedProps) || - changedProps.has("forecastEvent") + changedProps.size > 1 || + !changedProps.has("hass") ); } diff --git a/src/panels/lovelace/entity-rows/hui-media-player-entity-row.ts b/src/panels/lovelace/entity-rows/hui-media-player-entity-row.ts index f0f265a295..419bac0d7b 100644 --- a/src/panels/lovelace/entity-rows/hui-media-player-entity-row.ts +++ b/src/panels/lovelace/entity-rows/hui-media-player-entity-row.ts @@ -82,7 +82,11 @@ class HuiMediaPlayerEntityRow extends LitElement implements LovelaceRow { } protected shouldUpdate(changedProps: PropertyValues): boolean { - return hasConfigOrEntityChanged(this, changedProps); + return ( + hasConfigOrEntityChanged(this, changedProps) || + changedProps.size > 1 || + !changedProps.has("hass") + ); } protected render() { diff --git a/src/panels/lovelace/entity-rows/hui-weather-entity-row.ts b/src/panels/lovelace/entity-rows/hui-weather-entity-row.ts index c73825c355..cfea1c4542 100644 --- a/src/panels/lovelace/entity-rows/hui-weather-entity-row.ts +++ b/src/panels/lovelace/entity-rows/hui-weather-entity-row.ts @@ -90,7 +90,11 @@ class HuiWeatherEntityRow extends LitElement implements LovelaceRow { } protected shouldUpdate(changedProps: PropertyValues): boolean { - return hasConfigOrEntityChanged(this, changedProps); + return ( + hasConfigOrEntityChanged(this, changedProps) || + changedProps.size > 1 || + !changedProps.has("hass") + ); } protected updated(changedProps: PropertyValues): void {