prices lists and current price not updated#3152
Closed
tpd-opitz wants to merge 2 commits intoopenWB:masterfrom
Closed
prices lists and current price not updated#3152tpd-opitz wants to merge 2 commits intoopenWB:masterfrom
tpd-opitz wants to merge 2 commits intoopenWB:masterfrom
Conversation
0f5407a to
7f244e4
Compare
tpd-opitz
commented
Feb 19, 2026
Comment on lines
-69
to
-85
| if value: | ||
| now = datetime.now() | ||
| current_hour = now.hour | ||
| next_hour = None | ||
| for hour in TARIFF_UPDATE_HOURS: | ||
| if hour > current_hour: | ||
| next_hour = hour | ||
| break | ||
| # Wenn keine Stunde heute gefunden, nimm die erste Stunde vom nächsten Tag | ||
| if next_hour is None: | ||
| next_hour = TARIFF_UPDATE_HOURS[0] | ||
| next_query_time = (now + timedelta(days=1)).replace(hour=next_hour, minute=0, second=0, microsecond=0) | ||
| else: | ||
| next_query_time = now.replace(hour=next_hour, minute=0, second=0, microsecond=0) | ||
| # reduce serverload on their site by trying early and randomizing query time | ||
| next_query_time += timedelta(minutes=random.randint(1, 7) * -5) | ||
| Pub().pub("openWB/set/optional/ep/get/next_query_time", next_query_time.timestamp()) |
Contributor
Author
There was a problem hiding this comment.
Die stelle wird alle 5 Minuten 2 mal, bei dynamischen Netzentgelten wahrscheinlich sogar 3 mal aufgerufen , daher wurde hier alle 5 Minuten 2 oder 3 mal ein neues Query-Datum berechnet.
4110111 to
721a94a
Compare
…query time calculation
721a94a to
14e14f6
Compare
Contributor
Author
|
integriert in #3145 |
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.
backend updates are done via MQTT listener in optional_data.py