Versicharge: Fix Charging state (#6868)

This commit is contained in:
achgut 2023-03-17 11:47:21 +01:00 • committed by GitHub
parent 970f6d9ff7
commit 61350f0f67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,9 +104,9 @@ func (wb *Versicharge) Status() (api.ChargeStatus, error) {
switch s {
case 1: // Available
return api.StatusA, nil
case 2, 4, 5: // Preparing, Suspended EV, Suspended EVSE
case 2, 5: // Preparing, Suspended EV, Suspended EVSE
return api.StatusB, nil
case 3: // Charging
case 3, 4: // Charging
return api.StatusC, nil
default:
return api.StatusNone, fmt.Errorf("invalid status: %d", s)