britkat1980 / giv_tcp

TCP connection (from inverter) and MQTT implementation
71 stars 32 forks source link

REST tempPauseDischarge calls PauseCharge #126

Closed springfall2008 closed 8 months ago

springfall2008 commented 8 months ago

I just noticed this when reviewing some code

I think the last line below should say tempPauseDischarge?

@giv_api.route('/tempPauseDischarge', methods=['POST'])
def tmpPauseDischrg():
    payload = request.get_json(silent=True, force=True)
    if payload == "Cancel":
        if exists(".tpdRunning"):
            jobid= str(open(".tpdRunning","r").readline())
            logger.critical("Retrieved jobID to cancel Temp Pause Discharge: "+ str(jobid))
            return wr.cancelJob(jobid)
        else:
            logger.error("Force Charge is not currently running")
    else:
        return wr.tempPauseCharge(payload)
britkat1980 commented 8 months ago

fixed in 2.4.0