✨ Add get_device_kinds (device-kind catalogue by site UID) #35
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/get-device-kinds"
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
get_device_kinds(site_uid)→GET /api/devicekinds/by-site-uid/{site_uid}.Returns the catalogue of device kinds available for a site (the "add a device" picker: codes like
SOLAR_PANEL,GRID_METER,PRO_HEAT_PUMP, …).⚠️ Keyed by
siteUid, not the numeric site id. Unlike every other site-scoped method (which takes the numericsite_id), this endpoint takes the shortsiteUidstring (site["siteUid"], e.g."992179e1"). The parameter is namedsite_uidand the docstring calls this out explicitly.Uses the
_request(...)helper (inherits timeout + auto-reauth on 401); mirrors theget_connected_objectone-liner style.Tests
tests/test_device_kinds.py(mirrorstest_connected_objects.py's single-object tests): success (asserts path/api/devicekinds/by-site-uid/992179e1) and error (500 →ComwattAPIError). Full suite: 79 passed;mypyclean.Notes
## Featureslist updated.WIP:) — remove the WIP prefix to mark ready for review.Second of two independent slices for recommendation #16 (the other adds
get_tiles, #34).WIP: ✨ Add get_device_kinds (device-kind catalogue by site UID)to ✨ Add get_device_kinds (device-kind catalogue by site UID)da7fa7447b9df040928e