Go-E: fix panic
This commit is contained in:
parent
a39ca3aee1
commit
9d61d98414
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue