Fix GECloud and standalone PV, Fox cache updates#4076
Merged
Conversation
Contributor
There was a problem hiding this comment.
⚠️ Not ready to approve
GECloud gateway-selection logic can incorrectly treat “1 battery + PV” as “multiple batteries,” causing it to switch to gateway-only polling for single-battery systems.
Pull request overview
This PR updates the GivEnergy Cloud (GECloud) integration to better support standalone PV devices and adjusts Fox API caching behavior to handle device-list changes more safely, alongside a version bump and expanded test coverage.
Changes:
- GECloud: include standalone PV devices in auto-configuration and polling device lists.
- Fox: invalidate per-device cache ages when the device serial-number set changes, and refine first-run refresh behavior.
- Tests: add coverage for Fox cache invalidation when device lists change.
File summaries
| File | Description |
|---|---|
| apps/predbat/tests/test_fox_api.py | Updates/extends tests to cover first-run refresh rules and cache invalidation on device-list changes. |
| apps/predbat/predbat.py | Bumps PredBat version to v8.40.10. |
| apps/predbat/gecloud.py | Adds PV device detection and uses PV devices in entity config and polling; adds request logging. |
| apps/predbat/fox.py | Compares previous vs new device SN sets to drop per-device cache ages when devices change; adjusts device_detail refresh gating. |
Copilot's findings
- Files reviewed: 4/4 changed files
- Comments generated: 2
Note
Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.