Skip to content

Fix fox schedule issues#3835

Merged
springfall2008 merged 2 commits intomainfrom
fix/fox_schedule
Apr 25, 2026
Merged

Fix fox schedule issues#3835
springfall2008 merged 2 commits intomainfrom
fix/fox_schedule

Conversation

@springfall2008
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings April 25, 2026 20:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses Fox ESS scheduler write/read inconsistencies by tracking the device’s original scheduler slot count and ensuring written schedules are padded back to that same count, avoiding schedule-length mismatches.

Changes:

  • Add schedule padding support (target_count) to validate_schedule() and persist the device’s scheduler group count for later writes.
  • Remove the unused device_current_schedule state and switch event serial matching to use device_detail.
  • Expand Fox API tests to cover schedule padding behavior and assert the tracked scheduler slot count.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
apps/predbat/fox.py Track scheduler group count, pad validated schedules to device slot count, remove device_current_schedule, and update schedule write/test helpers.
apps/predbat/predbat.py Bump version to v8.37.5.
apps/predbat/tests/test_fox_api.py Update mocks for new state, add padding-focused tests, and validate device_scheduler_count.
apps/predbat/tests/test_fox_oauth.py Remove device_current_schedule from the OAuth test mock state.

@springfall2008 springfall2008 merged commit e778e41 into main Apr 25, 2026
1 check passed
@springfall2008 springfall2008 deleted the fix/fox_schedule branch April 25, 2026 20:14
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.

2 participants