-
Notifications
You must be signed in to change notification settings - Fork 3
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
Some API tweaking for openevse integration. #394
Comments
As I understand it the override API is just a single setting, and calling it again should just add to the override that's in place currently. As for the claims, a similar thing as long as the
This shouldn't be too hard. |
/override endpoint is an abstraction of /claim endpoint but only for "manual override" service id. When you create an override you can see it in /claim endpoint too. For the claims, yes it should only consider the properties of the same service ID you use of course. |
Looking at the code for python-openevse-http/openevsehttp/__main__.py Lines 776 to 811 in 6cc39e5
I'm only adjusting the claim the library makes and only adjusting whatever variables are passed, but that only piles on the current claim then I assume right or would it wipe what's currently in the claim and use what's been passed to it? |
On OpenEvse each time you make a new claim with same service ID or an override, you have to resend all the properties yes. |
Thanks for confirming. |
Following up #402, I create an issue here as its more appropriated.
1/ If a claim or an override is already present, API should add the property on it, instead of creating a new claim/override with only the latest property.
example: EVSE is manually set to enabled, user change the charge_rate, it then just create a new override with only "charge_current" , state is removed.
should instead create a new override with "charge_current" and "state"
2/ Same as above, If a claim/override have more than one property ( but auto_release ), removing a property should keep the other properties but not delete the claim/override. If there's only one property, it then should remove the override/claim.
3/ setting charge rate to its max value ( aka "max_current_soft" ) should remove the charge_current property from the override if there's other properties, or remove the override if there's only the "charge_current" one.
In all cases, it should not consider "auto_release" if set to "true" , as this one is always added to a claim/override by default. You can just ignore this property like it does on OpenEVSE UI side as there's no use case for override. But probably better to test the boolean state and just ignore it if it's true.
The text was updated successfully, but these errors were encountered: