✨ feat: get_site_network_time_series(site_id, site_network_type) #167
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/site-network-time-series"
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
Exposes the site-addressed
siteNetworkTypeoverload of thetime-seriesendpoint (live-verified 2026-10-11 — all six types return 200): read one of the site's virtual networks directly, including the battery flows.site_network_typeis a required positional (PRODUCTION,CONSUMPTION,INJECTION,WITHDRAWAL,CHARGE,DISCHARGE); the docstring pins the set and documents thatBATTERY/GRIDare rejected with 400 (use the directionalCHARGE/DISCHARGE). Response is the device-style{timestamps, values}and goes through the samenormalize_time_seriesfloat/None cleanup. Signature and absolute-window semantics mirrorget_device_ts_time_ago.Evidence
siteNetworkType=CONSUMPTION,aggregationTypeomitted, values normalized to float), batteryCHARGEwith full custom params (incl.timeAgoUnit=WEEK, which is valid there), absolute window (start/endsent,timeAgo*absent), 500 →ComwattAPIError;pytest= 220 passed;mypyclean.Merge Danger
Door: two-way — purely additive method; revert removes it cleanly.
Blast Radius: minimal — one new public method;
_aggregations_querygains an optional keyword that existing callers never pass.Closes #102 (with #166 covering the docstring-enum half)
WIP: ✨ feat: get_site_network_time_series(site_id, site_network_type)to ✨ feat: get_site_network_time_series(site_id, site_network_type)