Skip to content
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

Feature Refresh EV Vehicle Statuses #110

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

seang96
Copy link
Contributor

@seang96 seang96 commented Jan 4, 2025

I noticed refreshing statuses would not refresh EV statuses when running the refresh action. I have been "hacking" this via toggling my charger that I can also control in home assistant because the vehicle sends an update when charging state changes automatically. This solution is probably not a great method and probably not great for the health of battery / charger.

I took a look and there is a refresh battery button in the app so I looked into it and created this solution. I also noticed the app gets EV Status afterwards and will call the refresh afterwards differently depending on the generation.

With that all in mind, the changes I have added in here will refresh the battery info when the other statuses are refreshed or the action is called. To reduce API requests and errors, it will only if the car is an EV and will handle it the same way the app does with clicking the refresh button on the battery screen no matter the generation.

I also wanted to note I didn't really change much in init.py, but since the project lacks standard formatting, I assume this is happening because I did this on linux and the encoding or new lines are different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant