SMA: fix error messages (#1196)

This commit is contained in:
Benjamin Böhmke 2021-07-06 18:13:17 +02:00 • committed by GitHub
parent ae764c19ec
commit f9214a671e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 17 deletions

View file

@ -81,6 +81,8 @@ func NewSMA(uri, password, iface string, serial uint32, scale float64) (api.Mete
default:
return nil, errors.New("missing uri or serial")
}
// start update loop manually to get values as fast as possible
sm.device.StartUpdateLoop()
// decorate api.Battery in case of inverter
var soc func() (float64, error)