Skip to content

state: preserve energy and cost evidence before aggregating dashboard history #1291

Closed

Description

@frahlg

Part of the approved fixed history policy in #1287. Scalar history now has its own aggregate implementation. Dashboard history must also move to 10-second, one-minute and five-minute summaries without feeding averages into energy accounting.

DailyEnergy, LiveDayEnergy, integrateHistoryRange and ImportWhIntervals currently derive energy from timestamped dashboard powers. Averaging those powers first can cancel import against export, distort irregular intervals, lose EV baseline energy and manufacture coverage through outages.

Compute independent energy integrals and covered time from original observations before chart compaction. Preserve import/export and charge/discharge separately. Price and daily consumers must read this evidence, respect query/price boundaries and report gaps. Keep original measurements needed for the transition until equivalent accounting and full backup/restore have passed. The change must also preserve existing coarse legacy history without pretending it has finer resolution.

Acceptance: local reference tests for sign changes within a bucket, irregular cadence, restart, duplicate receipt, missing prices, outage/reconnect, midnight and tariff boundaries, mixed legacy/new history, rollup retry and restore. Compare energy and cost before and after chart retention; include target hardware evidence. No control cadence or safety change.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions