Skip to content

Commit

Permalink
Fix map autofit (#18799)
Browse files Browse the repository at this point in the history
  • Loading branch information
karwosts authored Nov 28, 2023
1 parent 6134f41 commit 081bd98
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/panels/lovelace/cards/hui-map-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,13 @@ class HuiMapCard extends LitElement implements LovelaceCard {
protected willUpdate(changedProps: PropertyValues): void {
super.willUpdate(changedProps);
if (
changedProps.has("hass") &&
this._config?.geo_location_sources &&
!deepEqual(
this._getSourceEntities(changedProps.get("hass")?.states),
this._getSourceEntities(this.hass.states)
)
(changedProps.has("hass") &&
this._config?.geo_location_sources &&
!deepEqual(
this._getSourceEntities(changedProps.get("hass")?.states),
this._getSourceEntities(this.hass.states)
)) ||
(this._config?.entities && hasConfigOrEntitiesChanged(this, changedProps))
) {
this._mapEntities = this._getMapEntities();
}
Expand Down

0 comments on commit 081bd98

Please sign in to comment.