Mercedes: add new charging status values (#22826)

This commit is contained in:
Rene Nulsch 2025-08-07 20:12:14 +03:00 • committed by GitHub
parent 5406cfaaeb
commit 418a49441d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -111,13 +111,16 @@ func (v *Provider) FinishTime() (time.Time, error) {
// 9=SLOW_CHARGING_AFTER_REACHING_TRIP_TARGET
// 10=CHARGING_AFTER_REACHING_TRIP_TARGET
// 11=FAST_CHARGING_AFTER_REACHING_TRIP_TARGET
// 12=UNKNOWN
// 12=COMMUNICATION_WITH_EVSE_ACTIVE_NO_ENERGY_FLOW
// 13=AC_CHARGING_ACTIVE
// 14=DC_CHARGING_ACTIVE
// 15=SOH_BATTERY_CALIBRATION_ACTIVE
// 16=UNKNOWN_STATUS
func MapChargeStatus(lookup int) api.ChargeStatus {
switch lookup {
case 0, 5, 6, 9, 10, 11:
case 0, 5, 6, 9, 10, 11, 13, 14:
return api.StatusC
case 1, 2, 4, 7, 8:
case 1, 2, 4, 7, 8, 12, 15:
return api.StatusB
}
return api.StatusA