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

Fix: Make ev_range, ev_range_with_ac and dcmSupplierName optional #340

Merged
merged 3 commits into from
Apr 15, 2024

Conversation

CM000n
Copy link
Collaborator

@CM000n CM000n commented Mar 28, 2024

Seems there was another change in the toyota api which requires to make some fields in the ElectricResponseModel optional.
This should fix DurgNomis-drol/ha_toyota#248

Copy link

codecov bot commented Mar 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.73%. Comparing base (709a8b7) to head (bfde50d).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #340   +/-   ##
=======================================
  Coverage   82.73%   82.73%           
=======================================
  Files          29       29           
  Lines        1413     1413           
=======================================
  Hits         1169     1169           
  Misses        244      244           
Flag Coverage Δ
unittests 82.73% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@briandelicata
Copy link

Now it's ending with the following error:

AttributeError: 'NoneType' object has no attribute 'unit'

@CM000n
Copy link
Collaborator Author

CM000n commented Mar 28, 2024

It looks like there is a major problem here, and your vehicle will no longer return any EVRange with air conditioning value at all. 😢

Is this information still displayed in the app?
If you are a bit more technically adept, you can look directly at the API and see what information comes back.
Unfortunately, I can't debug it myself as I have neither a plug-in hybrid nor a fully electric vehicle.

GitOldGrumpy
GitOldGrumpy previously approved these changes Mar 28, 2024
@CM000n CM000n changed the title Fix: Make ev_range and ev_range_with_ac optional Fix: Make ev_range, ev_range_with_ac and dcmSupplierName optional Apr 5, 2024
@CM000n
Copy link
Collaborator Author

CM000n commented Apr 5, 2024

Can you please approve it again @GitOldGrumpy?

It really is a shame that we have to touch the models so often.
I wonder what the best strategy is here to deal with the frequency of change and the changing content of API responses. 🤔

@briandelicata
Copy link

It looks like there is a major problem here, and your vehicle will no longer return any EVRange with air conditioning value at all. 😢

Is this information still displayed in the app? If you are a bit more technically adept, you can look directly at the API and see what information comes back. Unfortunately, I can't debug it myself as I have neither a plug-in hybrid nor a fully electric vehicle.

Have tested and now all the data is being retrieved for both cars. The EV range with A/C was avaialble in the new app up to a few weeks ago but for some reason Toyota removed it. Also for some reason the App messes up fuel range (miles/km) but not EV range in km.

IMG_3325
IMG_9A9ED2994391-1

@CM000n
Copy link
Collaborator Author

CM000n commented Apr 10, 2024

Thanks for testing @briandelicata. It's really annoying what Toyota is doing here.
Can one of the other maintainers [@DurgNomis-drol, @GitOldGrumpy, @joro75] please appove the pr again?

@CM000n CM000n merged commit e8bd9d1 into master Apr 15, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No device or entities
3 participants