-
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
[CORE] Add Teslamate integration #35
Conversation
Awesome stuff! Thanks for your work on this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 minor changes, but otherwise looks good to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this file. We could instead add a docker-compose.yml.teslamate example including TeslaETA.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, it was used for my development only and got committed by mistake.
elif name == "teslamate": | ||
return teslamate.TeslamateBackendProvider(base_url, car_id) | ||
else: | ||
raise Exception(f"Unknown backend provider : {name}. Available choices are 'teslalogger' or 'teslamagte'.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo in here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch with the typo, will fix it.
Sorry I just received the notification about it being merged. Thanks! |
This reverts commit 13af057.
Ciao,
Hope you're doing well!
You can find in this PR an integration with Teslamate in addition to Teslalogger. It's using the Factory pattern and interface extensions to have a clean code and working regardless of what the backend provider is.
I made a little modification regarding the distance mechanism. I've changed the check and instead of relying on the distance, it will check whether there is a "fixed" lat/long in the shared link DB (The form allows the creation without one). Therefore, if there is nothing, it will use the destination set in the Tesla.
Feel free to review it and don't hesitate to ask me if you have any question :)
And of course, please test it extensively!