1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-04-17 15:45:43 +01:00

Stabilize map colors (#30354)

This commit is contained in:
karwosts
2026-03-26 07:47:57 -07:00
committed by GitHub
parent bed39fd8e9
commit cff038fea4

View File

@@ -424,8 +424,10 @@ class HuiMapCard extends LitElement implements LovelaceCard {
}
const computedStyles = getComputedStyle(this);
color = getColorByIndex(this._colorIndex, computedStyles);
this._colorIndex++;
this._colorDict[entityId] = color;
if (color) {
this._colorIndex++;
this._colorDict[entityId] = color;
}
return color;
}