fix: name and icon color respect attribute choice (#1131)

This commit is contained in:
akloeckner
2024-09-05 22:39:37 +02:00
committed by GitHub
parent 47edf8135a
commit cbfba7a6a4

View File

@@ -151,7 +151,7 @@ class MiniGraphCard extends LitElement {
if (UPDATE_PROPS.some(prop => changedProps.has(prop))) {
this.color = this.computeColor(
this.tooltip.value !== undefined
? this.tooltip.value : this.entity[0] && this.entity[0].state,
? this.tooltip.value : this.getEntityState(0),
this.tooltip.entity || 0,
);
return true;