Fix current/voltage mixup for merged Chargepoints (#365)

This commit is contained in:
Robert Högberg
2024-11-13 00:17:10 +01:00
committed by GitHub
parent 1e7bcd73a9
commit 5f2bf26bc2

View File

@@ -131,8 +131,8 @@ data class ChargeLocation(
.filter { it.type == variant.type && it.power == variant.power }
val count = filtered.sumOf { it.count }
Chargepoint(variant.type, variant.power, count,
filtered.map { it.voltage }.distinct().singleOrNull(),
filtered.map { it.current }.distinct().singleOrNull()
filtered.map { it.current }.distinct().singleOrNull(),
filtered.map { it.voltage }.distinct().singleOrNull()
)
}
}