max ac out: filter non hybrid inverters - #3725
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Bugfix to ensure the “max AC out” discharge limiting logic only accounts for hybrid inverters (where battery power actually flows through the inverter), addressing the behavior discussed in #3397 / discussion #3446.
Changes:
- Skip non-hybrid inverters when calculating remaining inverter AC output headroom for battery discharge limiting.
- Add a unit test intended to cover the non-hybrid inverter scenario.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/control/bat_all.py | Adds a guard to exclude non-hybrid inverters from max AC out discharge limiting calculations. |
| packages/control/bat_all_test.py | Adds a test case for the “no hybrid system” scenario. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+220
to
+221
| if len(data.data.counter_all_data.get_entry_of_element(inverter.num)["children"]) == 0: | ||
| continue |
Comment on lines
+67
to
+68
| mock_entry_children = Mock(return_value={}) | ||
| monkeypatch.setattr(data.data.counter_all_data, "get_entry_of_element", mock_entry_children) |
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.
Bugfix for #3397
fixes #3446 (comment)