Add get_ecowatt (RTE EcoWatt grid-stress forecast) #36

Merged
mat merged 1 commit from feat/get-ecowatt into main 2026-07-05 08:22:31 +00:00
Owner

Summary

Adds a single read-only client method for the RTE EcoWatt grid-stress forecast.

  • get_ecowatt(self) -> list[dict]GET /ecowatt (no parameters).
  • Returns the forecast array: daily entries with a GREEN/ORANGE/RED status and a 24-entry hourly list.
  • Endpoint live-verified (200).

Changes

  • comwatt_client/client.py: new get_ecowatt method (same pattern/style as get_sites/get_tiles).
  • tests/test_ecowatt.py: success + 500-error tests (mirrors test_tiles.py, uses responses).
  • README.md: one method-list entry.

Test plan

  • pytest — 83 passed (81 baseline + 2 new).
  • mypy comwatt_client — clean.
  • TDD: new tests fail before implementation, pass after.

Draft — mark ready when you want it reviewed.

## Summary Adds a single read-only client method for the RTE **EcoWatt** grid-stress forecast. - `get_ecowatt(self) -> list[dict]` → `GET /ecowatt` (no parameters). - Returns the forecast array: daily entries with a `GREEN`/`ORANGE`/`RED` `status` and a 24-entry `hourly` list. - Endpoint live-verified (200). ## Changes - `comwatt_client/client.py`: new `get_ecowatt` method (same pattern/style as `get_sites`/`get_tiles`). - `tests/test_ecowatt.py`: success + 500-error tests (mirrors `test_tiles.py`, uses `responses`). - `README.md`: one method-list entry. ## Test plan - [x] `pytest` — 83 passed (81 baseline + 2 new). - [x] `mypy comwatt_client` — clean. - [x] TDD: new tests fail before implementation, pass after. Draft — mark ready when you want it reviewed.
Add get_ecowatt (RTE EcoWatt grid-stress forecast)
All checks were successful
Tests / forgejo-pytest (push) Successful in 42s
Tests / forgejo-pytest (pull_request) Successful in 42s
815e603e41
New read-only method GET /ecowatt (no parameters), returning the RTE
EcoWatt forecast array (daily GREEN/ORANGE/RED status + 24 hourly values).
Live-verified endpoint. Adds tests/test_ecowatt.py and a README entry.
mat changed title from WIP: Add get_ecowatt (RTE EcoWatt grid-stress forecast) to Add get_ecowatt (RTE EcoWatt grid-stress forecast) 2026-07-05 08:19:17 +00:00
mat merged commit db6144afbc into main 2026-07-05 08:22:31 +00:00
mat deleted branch feat/get-ecowatt 2026-07-05 08:22:31 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mat/python-comwatt-client!36
No description provided.