-
Notifications
You must be signed in to change notification settings - Fork 55
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
Fix stopAskingToStartCharging behaviour #589
base: main
Are you sure you want to change the base?
Conversation
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.
Looks good to me, agree with the direction re minimising unnecessary API calls
Does setting this while not at home produce an actual behavior change? The lines as originally written will skip any car that's not at home already. Though since the car will attempt to charge when plugged in anyway, I suspect we don't lose anything by setting it here, either. |
The change in behavior is that TWCManager stops trying to start a charge a car that is not at home. Right now it keeps polling the vehicle_data every minute, determines the location is not home, skips the car. Repeat. I don't expect a change in the actual charges because |
3rd fix: set |
… at 429 in wakeVehicle()
This may interact with #571's |
5th fix: set Hopefully this all is enough to stay within the free API tier limits. |
I'm running the code in this PR since yesterday. My wife's MS started charging upon plugging in, my MY did not. Had to manually start the charge. Not good. The dashboard said "charging stopped" but there was no stop command in the TWCManager logs (simply no session start either). I'll keep testing this code.. my understanding is that a Tesla will always just start charing when plugged into a live charger. Might be a fluke. Otherwise #571 is a nice solution indeed. |
See discussion in #575
2nd fix: set stopAskingToStartCharging when a vehicle is not at home so it is allowed to sleep remotely.