MCPcopy Create free account
hub / github.com/evcc-io/evcc / SetDefaultMode

Method SetDefaultMode

core/loadpoint_api.go:200–210  ·  view source on GitHub ↗

SetDefaultMode sets the default charge mode

(mode api.ChargeMode)

Source from the content-addressed store, hash-verified

198
199// SetDefaultMode sets the default charge mode
200func (lp *Loadpoint) SetDefaultMode(mode api.ChargeMode) {
201 lp.Lock()
202 defer lp.Unlock()
203
204 lp.log.DEBUG.Println("set default mode:", mode)
205
206 if lp.DefaultMode != mode {
207 lp.DefaultMode = mode
208 lp.settings.SetString(keys.DefaultMode, string(mode))
209 }
210}
211
212// GetChargedEnergy returns session charge energy in Wh
213func (lp *Loadpoint) GetChargedEnergy() float64 {

Callers

nothing calls this directly

Calls 4

LockMethod · 0.95
UnlockMethod · 0.95
PrintlnMethod · 0.80
SetStringMethod · 0.65

Tested by

no test coverage detected