-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Verify monsoon_data() raw Parameter Functionality #13
Comments
Hmm, do you think this is a problem with this codebase or the api itself? The logic of this flag also seems a little backwards to me, and it feels like if you pass |
Oh, I think this is the problem (in the monsoon-backend-api code): This logic checks sets the Which defaults to true when the query parameter is undefined, otherwise evaluates it against the False/false strings. |
Since this is in the API logic, I don't think we should adjust the behavior of the |
Agreed. I figured it was the backend API logic since this API package is only passing the value to be processed. I was working off of the comment and figured that's how the backend logic handled those bool values. This flag seemed backwards to me too. I'm all for switching it up and can add that line to the API package. We do still have the issue with the data return for both bool values being passed returning the same data. I still think there is something missing in that backend API logic somewhere preventing that delta calculation. Based on this discussion, when raw = raw = |
I'm not sure the bool values being passed for the optional
raw
parameter in monsoon_data() are processed correctly. This gets processed by TypeScript but the data returned for passing either True or False does not appear to be different.The comment for that param reads:
Default is False. If True the data will run through our delta calculation to return totals for all sensors during the monsoon period. When used raw adds datetime to return.
This comment can probably be written better but what I think is supposed to happen is:
True
: the delta calculation between each sensor's readings is returnedFalse
: the raw data is returned ex. the total amount of water currently being stored is reported at each report intervalThe text was updated successfully, but these errors were encountered: