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

Make forecast caching match observation caching #200

Merged
merged 2 commits into from
May 13, 2024

Conversation

MatthewFlamm
Copy link
Owner

@MatthewFlamm MatthewFlamm commented May 13, 2024

Downside of this approach is that it adds some calculations to the forecast in addition to checking for filtered forecasts. This will duplicate calculations. Future enhancement would have a separate method for filtering and additions.

Code refactored to filter forecast for old forecasts separately from making additions.

Copy link

codecov bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.67%. Comparing base (f050161) to head (068585c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #200      +/-   ##
==========================================
+ Coverage   93.40%   93.67%   +0.26%     
==========================================
  Files           9        9              
  Lines         622      632      +10     
==========================================
+ Hits          581      592      +11     
+ Misses         41       40       -1     

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

@MatthewFlamm
Copy link
Owner Author

Not updating cache would be expected in use with retry_no_data=True. This was found in home-assistant/core#117109

@lymanepp
Copy link
Collaborator

Looks okay to me.

@MatthewFlamm MatthewFlamm merged commit 3a64a83 into master May 13, 2024
9 checks passed
@MatthewFlamm MatthewFlamm deleted the fix-forecast-cache branch May 13, 2024 18:51
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.

None yet

2 participants