// SetTargetCharge sets loadpoint charge targetSoC
SetTargetCharge sets loadpoint charge targetSoC
// SetTargetCharge sets loadpoint charge targetSoC
func (lp *LoadPoint) SetTargetCharge(finishAt time.Time, soc int) {
	lp.Lock()
	defer lp.Unlock()
	lp.log.DEBUG.Printf("set target charge: %d @ %v", soc, finishAt)
	if lp.socTimer.Time != finishAt || lp.SoC.Target != soc {
		lp.socTimer.Set(finishAt)
		if !finishAt.IsZero() {
			lp.publish("targetTimeHourSuggestion", finishAt.Hour())
			lp.setTargetSoC(soc)
			lp.requestUpdate()
		}
	}
}
func ( lp * LoadPoint ) SetTargetCharge ( finishAt time . Time , soc int ) { lp . Lock ( ) defer lp . Unlock ( ) lp . log . DEBUG . Printf ( " " , soc , finishAt ) if lp . socTimer . Time != finishAt || lp . SoC . Target != soc { lp . socTimer . Set ( finishAt ) if ! finishAt . IsZero ( ) { lp . publish ( " " , finishAt . Hour ( ) ) lp . setTargetSoC ( soc ) lp . requestUpdate ( ) } } }
SetTargetCharge sets loadpoint charge targetSoC
SetTargetCharge sets loadpoint charge targetSoC
// apply immediately // don't remove soc