fix NPE in AvailabilityDetector

This commit is contained in:
johan12345
2021-09-06 20:34:20 +02:00
parent d79b554dcc
commit e2e95ce85d

View File

@@ -100,7 +100,7 @@ abstract class BaseAvailabilityDetector(private val client: OkHttpClient) : Avai
var i = 0
gePowers.map { gePower ->
val chargepoint =
chargepoints.find { it.type == type && it.power == gePower }!!
chargepoints.find { it.type in equivalentPlugTypes(type) && it.power == gePower }!!
val ids = allIds.subList(i, i + chargepoint.count).toSet()
i += chargepoint.count
chargepoint to ids