chore: minor
This commit is contained in:
parent
cfa35f295b
commit
27116902b2
1 changed files with 4 additions and 6 deletions
|
|
@ -124,7 +124,6 @@ func NewTqEm420FromConfig(other map[string]interface{}) (api.Meter, error) {
|
|||
}
|
||||
|
||||
req, err := request.New(http.MethodGet, fmt.Sprintf("%s/api/json/"+cc.Device+"/values/smart-meter", base), nil, headers)
|
||||
|
||||
if err == nil {
|
||||
err = client.DoJSON(req, &res)
|
||||
}
|
||||
|
|
@ -132,13 +131,12 @@ func NewTqEm420FromConfig(other map[string]interface{}) (api.Meter, error) {
|
|||
return res, err
|
||||
}, cc.Cache)
|
||||
|
||||
m := &TqEM420{
|
||||
dataG: dataG,
|
||||
if _, err := dataG(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
_, err := dataG()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
m := &TqEM420{
|
||||
dataG: dataG,
|
||||
}
|
||||
|
||||
return m, nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue