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

Method SetLimitEnergy

core/loadpoint_api.go:338–349  ·  view source on GitHub ↗

SetLimitEnergy sets the session energy limit

(energy float64)

Source from the content-addressed store, hash-verified

336
337// SetLimitEnergy sets the session energy limit
338func (lp *Loadpoint) SetLimitEnergy(energy float64) {
339 lp.Lock()
340 defer lp.Unlock()
341
342 lp.log.DEBUG.Println("set session energy limit:", energy)
343
344 // apply immediately
345 if lp.limitEnergy != energy {
346 lp.setLimitEnergy(energy)
347 lp.requestUpdate()
348 }
349}
350
351// GetPlanEnergy returns plan target energy
352func (lp *Loadpoint) GetPlanEnergy() (time.Time, float64) {

Callers 1

Calls 5

LockMethod · 0.95
UnlockMethod · 0.95
setLimitEnergyMethod · 0.95
requestUpdateMethod · 0.95
PrintlnMethod · 0.80

Tested by

no test coverage detected