✨ Add get_measure_keys (site measurement inventory) #33
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/get-measure-keys"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds
ComwattClient.get_measure_keys(site_id)wrappingGET /api/measurekeys/measurekeys?siteId=.Returns the flat per-site measurement inventory — one entry per
(device, measureKind)pair, each with a stable numericidand ameasureKeyUUID. It's a cheaper way to enumerate every metric on a site than walking the/devicestree, and a clean basis for an entity catalog (e.g. the Home Assistant integration).Live-verified against the production backend (HTTP 200).
Changes
get_measure_keys(site_id)onComwattClient(same_request+ typed-error conventions as the other getters).tests/test_measure_keys.py: success (asserts path/api/measurekeys/measurekeys+siteIdquery) and error (500 →ComwattAPIError).Test plan
pytest— 77 passed (75 existing + 2 new).mypy comwatt_client— no issues.Notes
mainon its own.WIP:title prefix to mark ready for review.WIP: ✨ Add get_measure_keys (site measurement inventory)to ✨ Add get_measure_keys (site measurement inventory)