Add get_tiles (dashboard tile configuration) #34

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

Summary

Adds get_tiles(site_id)GET /api/tiles?siteId={site_id}.

Returns the dashboard tile configuration for a site (which tile of which type — REAL_TIME / VALUATION / THIRD_PARTY — points at which device). It is configuration only, not live measurement values.

Mirrors the existing get_measure_keys one-liner style and the _request(...) helper (so it inherits timeout + auto-reauth on 401).

Tests

tests/test_tiles.py (mirrors test_measure_keys.py): success (asserts path /api/tiles + siteId query param) and error (500 → ComwattAPIError). Full suite: 79 passed; mypy clean.

Notes

  • Endpoint live-verified (2026-07-04): returns a list of tile objects.
  • README ## Features list updated.
  • Draft (WIP:) — remove the WIP prefix to mark ready for review.

First of two independent slices for recommendation #16 (the other adds get_device_kinds).

## Summary Adds `get_tiles(site_id)` → `GET /api/tiles?siteId={site_id}`. Returns the dashboard **tile configuration** for a site (which tile of which type — `REAL_TIME` / `VALUATION` / `THIRD_PARTY` — points at which device). It is configuration only, **not** live measurement values. Mirrors the existing `get_measure_keys` one-liner style and the `_request(...)` helper (so it inherits timeout + auto-reauth on 401). ## Tests `tests/test_tiles.py` (mirrors `test_measure_keys.py`): success (asserts path `/api/tiles` + `siteId` query param) and error (500 → `ComwattAPIError`). Full suite: **79 passed**; `mypy` clean. ## Notes - Endpoint live-verified (2026-07-04): returns a list of tile objects. - README `## Features` list updated. - Draft (`WIP:`) — remove the WIP prefix to mark ready for review. _First of two independent slices for recommendation #16 (the other adds `get_device_kinds`)._
Add get_tiles (dashboard tile configuration)
All checks were successful
Tests / forgejo-pytest (push) Successful in 42s
Tests / forgejo-pytest (pull_request) Successful in 42s
a2fd20efee
mat changed title from WIP: Add get_tiles (dashboard tile configuration) to Add get_tiles (dashboard tile configuration) 2026-07-05 08:07:46 +00:00
mat merged commit c572c72cba into main 2026-07-05 08:08:00 +00:00
mat deleted branch feat/get-tiles 2026-07-05 08:08:00 +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!34
No description provided.