def flaskSetPeopleInRoom(): peopleinroom = True if request.args.get("peopleinroom","1")=="1" else False wkpf.setProperty(occupancyWuObject, propertyNumber=0, datatype=wkpf.DATATYPE_BOOLEAN, value=peopleinroom) return "peopleinroom set to {}".format(peopleinroom)
def flaskSetThreshold(): threshold = int(request.args.get("threshold","255")) wkpf.setProperty(numericInputWuObject, propertyNumber=0, datatype=wkpf.DATATYPE_INT16, value=threshold) return "threshold set to {}".format(threshold)