Skip to content

Commit

Permalink
Fix SE Home Charger broken by 1p3p (evcc-io#9440)
Browse files Browse the repository at this point in the history
  • Loading branch information
snowball77 authored Aug 19, 2023
1 parent 97aef0c commit b67008f
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions charger/keba-modbus.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,11 @@ func NewKebaFromConfig(other map[string]interface{}) (api.Charger, error) {
}

// phases
b, err = wb.conn.ReadHoldingRegisters(kebaRegPhaseSource, 2)
if err != nil {
return nil, err
}

var phases func(int) error
if source := binary.BigEndian.Uint32(b); source == 3 {
phases = wb.phases1p3p
if b, err := wb.conn.ReadHoldingRegisters(kebaRegPhaseSource, 2); err == nil {
if source := binary.BigEndian.Uint32(b); source == 3 {
phases = wb.phases1p3p
}
}

// failsafe
Expand Down

0 comments on commit b67008f

Please sign in to comment.