chargepoint peaks: fix cp sum in case of error#3585
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Die Änderungen sorgen dafür, dass Gesamtwerte (v. a. Zählerstände) von PV-/Batterie-/Ladepunkt-Modulen auch dann weiter aufsummiert werden, wenn einzelne Komponenten im Fehlerzustand sind, um Sprünge/fehlende Gesamtsummen zu vermeiden (Ticket #66005609).
Changes:
- Aggregationslogik für PV (
pv_all.py), Batterie (bat_all.py) und Ladepunkte (chargepoint_all.py) so angepasst, dass Summen auch bei Fehlerzuständen der Einzelmodule weiter gebildet werden. - Fault-State-Ermittlung vereinheitlicht (per
max(...)) und Fault-Strings entsprechend angepasst. - Neuer Test für
AllChargepoints.get_cp_sum()ergänzt, der Summierung auch bei fehlerhaftem Ladepunkt abdeckt.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/control/pv_all.py | PV-Summenbildung angepasst (Power/Exported/Fault-State) und Publishes reorganisiert. |
| packages/control/chargepoint/chargepoint_all.py | Ladepunkt-Summenbildung angepasst, sodass Zählerstände auch bei Fehlerzustand einfließen. |
| packages/control/chargepoint/chargepoint_all_test.py | Neuer Pytest, der Summenbildung inkl. Fault-State/Fault-String prüft. |
| packages/control/bat_all.py | Batterie-Summenbildung angepasst (Power/Import/Export/SoC/Fault-State). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Wenn Komponenten im Fehlerzustand sind, wird deren Zählerständ trotzdem in die Gesamtsumme eingerechnet, damit es keinen großen Sprung gibt und man zuverlässig eine Gesamtsumme hat. Wenn zB ein LP nicht funktioniert, fehlt dieser sonst in der Gesamtsumme und im nächsten Zyklus ist er wieder eingerechnet und es gibt einen Sprung.
Ticket #66005609