Conversation
pailozka
commented
Aug 17, 2026
Collaborator
- Introduced [CO2_API] section with TYPE selector (nowtricity|wattnet).
- Nowtricity settings: BASE_URL, ZONE, USER_AGENT, API_KEY (unified prefix).
- Wattnet settings: URL, API_KEY, ZONE, FOOTPRINT_TYPE, SCOPE.
- Removed hardcoded Nowtricity API URLs — configurable via config.ini.
- Introduced [CO2_API] section with TYPE selector (nowtricity|wattnet). - Nowtricity settings: BASE_URL, ZONE, USER_AGENT, API_KEY (unified prefix). - Wattnet settings: URL, API_KEY, ZONE, FOOTPRINT_TYPE, SCOPE. - Removed hardcoded Nowtricity API URLs — configurable via config.ini.
pailozka
commented
Aug 17, 2026
| # Reverse to newest first (to match Nowtricity order) and take last 24 | ||
| result = hourly_values[::-1][:24] | ||
|
|
||
| if len(result) < 24: |
Collaborator
Author
There was a problem hiding this comment.
questionable if feeding padded data into decisions is the right approach. rather fail loudly:
if len(result) < 24: raise ValueError(f"Wattnet API returned only {len(result)}/24 hourly values")
it is consistent with the fallback logic here:
throttlepoint/src/hpc_eff/utils/controller.py
Lines 173 to 184 in cb523c5
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.