chore: minor

This commit is contained in:
andig 2022-04-26 00:06:01 +02:00
parent 4ab3d7fb75
commit 5fd04bec95
2 changed files with 3 additions and 3 deletions

View file

@ -58,7 +58,7 @@ func NewTapo(uri, user, password string, standbypower float64) (*Tapo, error) {
}
if user == "" || password == "" {
return tapo, fmt.Errorf("missing user/password")
return tapo, fmt.Errorf("missing user or password")
}
return tapo, nil

View file

@ -26,7 +26,7 @@ func init() {
//go:generate go run ../cmd/tools/decorate.go -f decorateSMA -b *SMA -r api.Meter -t "api.Battery,SoC,func() (float64, error)"
// NewSMAFromConfig creates a SMA Meter from generic config
// NewSMAFromConfig creates an SMA meter from generic config
func NewSMAFromConfig(other map[string]interface{}) (api.Meter, error) {
cc := struct {
URI, Password, Interface string
@ -44,7 +44,7 @@ func NewSMAFromConfig(other map[string]interface{}) (api.Meter, error) {
return NewSMA(cc.URI, cc.Password, cc.Interface, cc.Serial, cc.Scale)
}
// NewSMA creates a SMA Meter
// NewSMA creates an SMA meter
func NewSMA(uri, password, iface string, serial uint32, scale float64) (api.Meter, error) {
sm := &SMA{
uri: uri,