Update CpState to match updated Peblar API docs#430
Open
m-a-r-k-e wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
The Peblar API documentation related to the
EVInterfaceCpStateis updated https://developer.peblar.com/local-rest-api#tag/EVInterface. The values for theINVALIDandUNKNOWNstate are changed.This pull request updates the
CpStatevalues to match the updated documentation.Also the
CpStatedescriptions are updated to match the Peblar API documentation.Background
In the last year the Peblar Home Assistant integration stopped working two times due to an invalid CpState state:
The Peblar EVInterface endpoint reported at that moment:
{ "ChargeCurrentLimit" : 0, "ChargeCurrentLimitActual" : 0, "ChargeCurrentLimitSource" : "Local REST API", "CpState" : "State Invalid", "Force1Phase" : false, "LockState" : true }At that moment this state was not described in the Peblar API documentation, so I asked Peblar support and got the following response:
State Invalidfeels also more logical related to the other state (and that one is confirmed by my own charger). Theunkown stateis still an exception (next to the typo in the mail), especially because it also starts with lowercase.Finally also the documentation on the Peblar website is updated (it matches the state as described in the mail response, only the typo is fixed), so I think this is the right moment to also update this project.