Keba: fix enabled status of charger (#8149)
(cherry picked from commit 6b56d106f8a5e814b7ed502d5a1ec5aa24ad871a)
This commit is contained in:
parent
bb10dc4ac7
commit
f9311a1023
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue