Skip to content

Commit

Permalink
Add evseId to class Chargepoint
Browse files Browse the repository at this point in the history
.. and populate it in nobil data source
  • Loading branch information
robho committed Nov 28, 2024
1 parent 5d0bc87 commit ca59d35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/src/main/java/net/vonforst/evmap/api/nobil/NobilModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,9 @@ data class NobilChargerStation(

val connectionVoltage = if (attribs["12"]?.attrVal is String) attribs["12"]?.attrVal.toString().toDoubleOrNull() else null
val connectionCurrent = if (attribs["31"]?.attrVal is String) attribs["31"]?.attrVal.toString().toDoubleOrNull() else null
val evseId = if (attribs["28"]?.attrVal is String) attribs["28"]?.attrVal.toString() else null

return Chargepoint(connectionType, connectionPower, 1, connectionCurrent, connectionVoltage)
return Chargepoint(connectionType, connectionPower, 1, connectionCurrent, connectionVoltage, listOf(evseId))
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/java/net/vonforst/evmap/model/ChargersModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,9 @@ data class Chargepoint(
// Max voltage in V (or null if unknown).
// note that for DC chargers: current * voltage may be larger than power
// (each of the three can be separately limited)
val voltage: Double? = null
val voltage: Double? = null,
// Electric Vehicle Supply Equipment Ids for this Chargepoint's plugs/sockets
val evseIds: List<String?> = emptyList()
) : Equatable, Parcelable {
fun hasKnownPower(): Boolean = power != null
fun hasKnownVoltageAndCurrent(): Boolean = voltage != null && current != null
Expand Down

0 comments on commit ca59d35

Please sign in to comment.