-
Notifications
You must be signed in to change notification settings - Fork 882
fix: consumption for drives with positive soc diff #4746
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
Conversation
✅ Deploy Preview for teslamate ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@micku7zu - please have a look / test / leave feedback as well. |
|
I've saw in the code that this case was actively excluded by using the What you've fixed here is a great addition, thanks for your work! But my edge case described here #4717 it's a little bit different. It's not about the case when a drive has a positive soc difference at the end of the trip. it's about a drive that has a greater soc during the drive than the start of the trip, or it has a lower soc during the drive than the end of the trip. This pull request does what it's supposed to do based on its description, so I think we can leave it as is and continue the discussion on the issue I reported. |
|
Sorry, will update this PR to cover that case as well! |
|
@micku7zu - updated this PR - performance should be better as well, I'm now reusing the query of the consumtion gross avg panel. could you maybe post a before and after screenshot hopefully showing correct numbers for the latter? |
|
Thanks! Will do but I'm currently away from laptop for 24 hours. |
|
I will test on slow HW before merging |
|
One query deleted, rest as is. Should be good! |
|
shall we merge this before #4756? |
|
Yes, will rebase #4756 afterwards! |
|
will do a test on slow HW right now and then merge (and then ditch my slow production system) |
JakobLichterfeld
left a comment
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.
Successfully tested on slow host HW


fixes #3659
driving downhill and recovering more energy than what is actually consumed leads to wrong data as queries have actively excluded these cases so far, mostly by wrapping the range_diff used for consumption calculation with
greatest(range_diff, 0).multiple dashboards have been touched, see before and after for two examples that show the improvements.
before - drives

after - drives

before - drive details

after - drive details

fixes #4717
the explanation in #4717 is perfect, this pr is addressing that by entirely changing the way total consumption gross is calculated. It's now reusing the query results of Ø consumption gross.