calc charge cost by used energy source in 5 min intervall#2842
Merged
LKuemmel merged 2 commits intoopenWB:masterfrom Oct 29, 2025
Merged
calc charge cost by used energy source in 5 min intervall#2842LKuemmel merged 2 commits intoopenWB:masterfrom
LKuemmel merged 2 commits intoopenWB:masterfrom
Conversation
e497539 to
b81b788
Compare
b81b788 to
43a7913
Compare
tpd-opitz
reviewed
Oct 29, 2025
| charged_energy = (reference_entries[-1]["cp"][f"cp{cp.num}"]["imported"] - | ||
| reference_entries[0]["cp"][f"cp{cp.num}"]["imported"]) | ||
| elif reference == ReferenceTime.END: | ||
| if (timecheck.create_timestamp() - cp.data.set.log.timestamp_start_charging) < 300: |
Contributor
There was a problem hiding this comment.
beziehen sich die 300 Sekunden auf das Interval der Einträge im Log oder auf das Aktualisierungsintervall für die Strompreise?
Contributor
Author
There was a problem hiding this comment.
Auf das Interval der Einträge im Tageslog. das Aktualisierungsintervall für die Strompreise hat mit dem Ladeprotokoll nichts zu tun.
| if (one_hour_back - cp.data.set.log.timestamp_start_charging) < 0: | ||
| # Wenn der Ladevorgang erst innerhalb des letzten 5 Min Intervalls gestartet wurde, | ||
| # ist das das erste Zwischenergebnis. | ||
| if (timecheck.create_timestamp() - cp.data.set.log.timestamp_start_charging) < 300: |
Contributor
There was a problem hiding this comment.
Da die 300 Sekunden hier noch mal auftauchen würde sich eine Konstante anbieten...;o)
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.