Keba: fix enabled status of charger (#8149)

(cherry picked from commit 6b56d106f8a5e814b7ed502d5a1ec5aa24ad871a)
This commit is contained in:
Konstantin 2023-05-23 22:57:14 +02:00 • committed by GitHub
parent bb10dc4ac7
commit f9311a1023
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -175,7 +175,8 @@ func (wb *Keba) Enabled() (bool, error) {
if err != nil {
return false, err
}
return binary.BigEndian.Uint32(b) != 5, nil
status := binary.BigEndian.Uint32(b)
return !(status == 5 || status == 1), nil
}
// Enable implements the api.Charger interface