fix: consolidate controller statistics widgets
This commit is contained in:
@@ -25,10 +25,18 @@ configuration.
|
||||
- For current states across controllers, call `shd_get_home_live_state`, then
|
||||
`shd_render_controller_live_state_widget`.
|
||||
- For one presence, binary state or numeric sensor statistics, call
|
||||
`shd_get_controller_state_statistics`, then
|
||||
`shd_render_controller_statistics_widget`. The server result is authoritative
|
||||
for counts, intervals, durations, percentages, medians and hourly buckets;
|
||||
do not calculate them from raw history in the model.
|
||||
`shd_get_controller_state_statistics` once for the exact canonical
|
||||
controller/item/source series, then call
|
||||
`shd_render_controller_statistics_widget` once with that final result. For a
|
||||
request containing several explicitly named rooms/sensors or an all-together
|
||||
request, resolve only matching requested measurements, call the data tool once per selected series, collect the complete
|
||||
results with visible room/item labels into one `data.series` collection, and
|
||||
call the render tool once for the collection. The server result is
|
||||
authoritative for counts, intervals, durations, percentages, medians and
|
||||
hourly buckets; do not calculate them from raw history in the model. Do not
|
||||
enumerate every inventory match, render retries/intermediate results or an
|
||||
unavailable optional source. Resolve controller and item IDs from
|
||||
topology/inventory, not display names.
|
||||
- For raw time-series history, call `shd_get_controller_source_history`, then
|
||||
`shd_render_controller_history_widget`. Keep the detailed rows in the widget
|
||||
after a successful render and use plain text only when the UI call is
|
||||
|
||||
Reference in New Issue
Block a user