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

Method SetEnableThreshold

core/loadpoint_api.go:530–544  ·  view source on GitHub ↗

SetEnableThreshold sets loadpoint enable threshold

(threshold float64)

Source from the content-addressed store, hash-verified

528
529// SetEnableThreshold sets loadpoint enable threshold
530func (lp *Loadpoint) SetEnableThreshold(threshold float64) {
531 lp.Lock()
532 defer lp.Unlock()
533
534 lp.log.DEBUG.Println("set enable threshold:", threshold)
535
536 if lp.Enable.Threshold != threshold {
537 lp.Enable.Threshold = threshold
538 // TODO reduce APIs
539 lp.setThresholds(loadpoint.ThresholdsConfig{
540 Enable: lp.Enable,
541 Disable: lp.Disable,
542 })
543 }
544}
545
546// GetDisableThreshold gets the loadpoint enable threshold
547func (lp *Loadpoint) GetDisableThreshold() float64 {

Callers

nothing calls this directly

Calls 4

LockMethod · 0.95
UnlockMethod · 0.95
setThresholdsMethod · 0.95
PrintlnMethod · 0.80

Tested by

no test coverage detected