You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: lgess.go
    path of file: ./repos/evcc/meter
    
    the code of the file until where you have to start completion: package meter

import (
	"errors"
	"fmt"
	"strings"
	"time"

	"github.com/evcc-io/evcc/api"
	"github.com/evcc-io/evcc/meter/lgpcs"
	"github.com/evcc-io/evcc/util"
)

/*
This meter supports the LGESS HOME 8 and LGESS HOME 10 systems from LG with / without battery.

** Usage
    
func NewLgEssFromConfig(other map[string]interface{}) (api.Meter, error) {
	cc := struct {
		capacity               `mapstructure:",squash"`
		URI, Usage             string
		Registration, Password string
		Cache                  time.Duration
	}{
		Cache: time.Second,
	}

	if err := util.DecodeOther(other, &cc); err != nil {
		return nil, err
	}

	if cc.Usage == "" {
		return nil, errors.New("missing usage")
	}

	return NewLgEss(cc.URI, cc.Usage, cc.Registration, cc.Password, cc.Cache, cc.capacity.Decorator())
}