Fox - fix issue with export limit and v2 scheduler#4193
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Fox EVO (v2 scheduler) handling so that scheduler responses’ properties metadata (range/unit/precision) is preserved and used when deriving device settings (notably ExportLimit). This ensures derived settings publish as editable HA number.* entities (with min/max/step) rather than falling back to plain sensors that leave automatic_config-wired entity IDs unresolvable.
Changes:
- Preserve and forward the v2 scheduler
propertiesblock throughget_scheduler_v2()intoget_scheduler(). - Enhance
update_settings_from_schedule()to attach range/unit/precision frompropertieswhen synthesizing settings like ExportLimit/ImportLimit/PvLimit. - Add regression tests ensuring v2
propertiesare honored and derived ExportLimit publishes as anumberentity; bump version to v8.44.3.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| apps/predbat/fox.py | Pass through v2 scheduler properties and use them to derive editable number settings (ExportLimit, etc.). |
| apps/predbat/tests/test_fox_api.py | Add regression tests for v2 properties handling and ExportLimit publishing as a number entity. |
| apps/predbat/predbat.py | Bump THIS_VERSION to v8.44.3. |
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.