-
Notifications
You must be signed in to change notification settings - Fork 62
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
feat: add support for HTTP Proxy #454
Conversation
@alandtse @llamafilm have a look when you've got a minute. This approach avoids changes to any of the functions or their signatures as it lays the responsibility to ensure the VIN is used inside the function that handles the api communication itself. I've set it to draft as I still need to verify this actually works, all the tests pass but consider it a proof of concept until then. |
Please address the lint issues. |
done, still trying to verify it's working though. My pc isn't co-operating today... |
@alandtse needed a minor fix but verified this works for my car, so as long as the Tesla guy wasn't lying about the old API supporting VINs this should work for everyone with 0 impact. |
I like this approach, preserving compatibility. I tested this and it works with my car. I suggest a few changes:
One thing to note: Reinstalling a new version of the add-on (https://github.com/thierryvt/tesla) which depends on this updated library did not actually update the library. I had to login to the homeassistant Docker container and manually reinstall the newer teslajsonpy. Hopefully that's just something weird about my dev environment and it will not affect other users... |
Do not bump versions. You do not control that. It is controlled by conventional commits. |
I'll squash the commits and remove the warnings. I had the same experience with trying to test this code btw, it should work fine when this gets released and the version bumped in the tesla plugin. |
bfc5d7f
to
05740be
Compare
- Added optional parameters to send commands via tesla-http-proxy (required for new API) - All communication with Tesla's API now attempts to use the VIN instead of the car_id - removed warning that Tesla has no official API support.
bit messy because pycharm has a different idea of what squashing means than I do. Nothing a bit of force pushing and head resetting can't solve. Unless there's more feedback this PR is ready to merge. |
We squash on merge so you didn't need to squash anything. But ok. |
defaults to using the vehicle VIN by checking (and overwriting) the vehicle_id path param and without changing any of the function signatures