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: evsewifi.go
    path of file: ./repos/evcc/charger
    
    the code of the file until where you have to start completion: package charger

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

	"github.com/evcc-io/evcc/api"
	"github.com/evcc-io/evcc/charger/evse"
	"github.com/evcc-io/evcc/provider"
	"github.com/evcc-io/evcc/util"
	"github.com/evcc-io/evcc/util/request"
)

// EVSEWifi charger implementation
type EVSEWifi struct {
	*request.Helper
	uri          string
	alwaysActive bool
	current      int64 // current will always be the physical value sent to the API
	hires        bool
	paramG       provider.Cacheable[evse.ListEntry]
}

func init() {
	registry.Add("smartwb", NewEVSEWifiFromConfig)
	registry.Add("evsewifi", NewEVSEWifiFromConfig)
}

//go:generate go run ../cmd/tools/decorate.go -f decorateEVSE -b *EVSEWifi -r a
    
func NewEVSEWifiFromConfig(other map[string]interface{}) (api.Charger, error) {
	cc := struct {
		URI   string
		Meter struct {
			Power, Energy, Currents, Voltages bool
		}
		Cache time.Duration
	}{
		Cache: time.Second,
	}

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

	wb, err := NewEVSEWifi(util.DefaultScheme(cc.URI, "http"), cc.Cache)
	if err != nil {
		return wb, err
	}

	// auto-detect capabilities
	params, err := wb.paramG.Get()
	if err != nil {
		return wb, err
	}

	if !params.AlwaysActive {
		return nil, errors.New("evse must be configured to remote mode")
	}

	if params.UseMeter {
		cc.Meter.Power = true
		cc.Meter.Energy = true
		cc.Meter.Currents = true
		cc.Meter.Voltages = true
	}

	if params.ActualCurrentMA != nil {
		wb.hires = true
	}

	// decorate Charger with Meter
	var currentPower func() (float64, error)
	if cc.Meter.Power {
		currentPower = wb.currentPower
	}

	// decorate Charger with MeterEnergy
	var totalEnergy func() (float64, error)
	if cc.Meter.Energy {
		totalEnergy = wb.totalEnergy
	}

	// decorate Charger with PhaseCurrents
	var currents func() (float64, float64, float64, error)
	if cc.Meter.Currents {
		currents = wb.currents
	}

	// decorate Charger with PhaseVoltages
	var voltages func() (float64, float64, float64, error)
	if cc.Meter.Voltages {
		voltages = wb.voltages
	}

	// decorate Charger with MaxCurrentEx
	var maxCurrentEx func(float64) error
	if wb.hires {
		maxCurrentEx = wb.maxCurrentEx
		wb.current = 100 * wb.current
	}

	// decorate Charger with Identifier
	var identify func() (string, error)
	if params.RFIDUID != nil {
		identify = wb.identify
	}

	return decorateEVSE(wb, currentPower, totalEnergy, currents, voltages, maxCurrentEx, identify), nil
}