Skip to content

Commit

Permalink
Go-E: fix panic
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Jan 1, 2022
1 parent a39ca3a commit 9d61d98
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion charger/go-e.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,10 @@ var _ api.Identifier = (*GoE)(nil)
// Identify implements the api.Identifier interface
func (c *GoE) Identify() (string, error) {
resp, err := c.api.Status()
return resp.Identify(), err
if err != nil {
return "", err
}
return resp.Identify(), nil
}

// totalEnergy implements the api.MeterEnergy interface - v2 only
Expand Down

0 comments on commit 9d61d98

Please sign in to comment.