Alfen: Fix status mapping (#2843)
This commit is contained in:
parent
c4502847f1
commit
f8f7504f41
1 changed files with 1 additions and 7 deletions
|
|
@ -117,14 +117,8 @@ func (wb *Alfen) Status() (api.ChargeStatus, error) {
|
|||
}
|
||||
|
||||
switch r := rune(b[0]); r {
|
||||
case 'A', 'B', 'D', 'E', 'F':
|
||||
case 'A', 'B', 'C', 'D', 'E', 'F':
|
||||
return api.ChargeStatus(r), nil
|
||||
case 'C':
|
||||
// C1 is "connected"
|
||||
if rune(b[1]) == '1' {
|
||||
return api.StatusB, nil
|
||||
}
|
||||
return api.StatusC, nil
|
||||
default:
|
||||
return api.StatusNone, fmt.Errorf("invalid status: %0x", b[:1])
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue