Help for ocpp.csms.authorize_balance

Sample CLI

gway ocpp.csms authorize-balance

Full Code

def authorize_balance(**record):
    """
    Default OCPP RFID secondary validator: Only authorize if balance >= 1.
    The RFID needs to exist already for this to be called in the first place.
    """
    try:
        return float(record.get("balance", "0")) >= 1
    except Exception:
        return False