Fix sankey total calculation to account for `included_in_stat`
parent
634e1dbde8
commit
d30674f5ee
|
@ -238,7 +238,6 @@ class HuiEnergySankeyCard
|
||||||
if (value < 0.01) {
|
if (value < 0.01) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
untrackedConsumption -= value;
|
|
||||||
const node = {
|
const node = {
|
||||||
id: device.stat_consumption,
|
id: device.stat_consumption,
|
||||||
label:
|
label:
|
||||||
|
@ -260,6 +259,8 @@ class HuiEnergySankeyCard
|
||||||
source: node.parent,
|
source: node.parent,
|
||||||
target: node.id,
|
target: node.id,
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
untrackedConsumption -= value;
|
||||||
}
|
}
|
||||||
deviceNodes.push(node);
|
deviceNodes.push(node);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue