Skip to content

Commit 4b4cfc9

Browse files
committed
Add Missing Invert of Battery Power
The negate preference had not being used when getting the battery data.
1 parent 73f108f commit 4b4cfc9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/panels/lovelace/cards/energy/hui-power-sources-graph-card.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ export class HuiPowerSourcesGraphCard
187187

188188
if (source.type === "battery") {
189189
if (source.stat_rate) {
190-
statIds.battery.stats.push({ id: source.stat_rate });
190+
statIds.battery.stats.push({
191+
id: source.stat_rate,
192+
negate: !!source.stat_rate_negate,
193+
});
191194
}
192195
continue;
193196
}

0 commit comments

Comments
 (0)