Skip to content

Batch compatible statistics requests - #630

Open
rosenrot00 wants to merge 1 commit into
dbuezas:masterfrom
rosenrot00:batch-statistics-requests
Open

Batch compatible statistics requests#630
rosenrot00 wants to merge 1 commit into
dbuezas:masterfrom
rosenrot00:batch-statistics-requests

Conversation

@rosenrot00

@rosenrot00 rosenrot00 commented Jul 29, 2026

Copy link
Copy Markdown

Summary

  • Batch static statistics entities sharing the same period and time range into one recorder/statistics_during_period request.
  • Keep dynamic or incompatible entities on the existing individual request path.
  • Fall back to individual requests if batching fails.
  • Add tests for batching, cache reuse, different periods, dynamic entities, and fallback behavior.

Motivation

Home Assistant supports multiple statistic_ids per request, but the card currently sends one request per trace. This reduces four compatible series from four requests to one without requiring configuration changes.

Testing

  • npm run tsc
  • 15 relevant Jest tests passed
  • npm run build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant