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

Method maybePushVehicleConnect

core/loadpoint.go:478–490  ·  view source on GitHub ↗

maybePushVehicleConnect sends a deferred connect notification once vehicle detection has settled

()

Source from the content-addressed store, hash-verified

476// maybePushVehicleConnect sends a deferred connect notification once vehicle
477// detection has settled
478func (lp *Loadpoint) maybePushVehicleConnect() {
479 if !lp.connectPending {
480 return
481 }
482
483 // hold while detection is still running and the vehicle is unidentified
484 if lp.GetVehicle() == nil && !lp.vehicleDetect.IsZero() {
485 return
486 }
487
488 lp.connectPending = false
489 lp.pushEvent(evVehicleConnect)
490}
491
492// publish sends values to UI and databases
493func (lp *Loadpoint) publish(key string, val any) {

Callers 1

UpdateMethod · 0.95

Calls 3

GetVehicleMethod · 0.95
pushEventMethod · 0.95
IsZeroMethod · 0.45

Tested by

no test coverage detected