-
Notifications
You must be signed in to change notification settings - Fork 80
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(EU): correction to get total power consumed from driving info #419
Conversation
total power consumed is obtained from drivingInfo, not drivingInfoDetail
@ZuinigeRijder could you review this? I think this may impact your integration. |
I will have a closer look later today or tomorrow. |
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.
I would expect on line 1038 an extra check to avoid an error on possibly missing drivingInfoDetail:
if get_child_value(responseAlltime, "resMsg.drivingInfoDetail.0"):
I assume you want to have that check so that the calculation of daily driving stats that follows is succesfull. But therefore you will have to test for presence of drivingInfoDetail in the response30d, not in the responseAlltime. So line 1038 should be If agreed, I will make the additional change in this PR. |
get total odometer value from responseAlltime.drivingInfo and added extra check before calculating daily stats from response30d.drivingInfoDetail
adjusted now included extra if statement |
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.
LGTM
total power consumed is obtained from drivingInfo, not drivingInfoDetail