Repository navigation
fix: show recorded day energy after measurement gaps - #1613
Merged
Merged
Conversation
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and result
A recorded PV gap makes today's solar and consumption totals
null, even after live readings recover. The flow view then shows0.00 kWhfor that missing solar total.Expose recorded subtotals beside the existing nullable totals. Energy today, Overview and the flow view show
≥for partial energy and explain the gaps. A flow with no measured subtotal stays Unknown; a measured zero stays zero. Keep the daily self-powered share unknown when import or consumption is incomplete.Scope and safety
Missing periods stay unfilled. The full-range fields retain their quality mask, so older clients still receive
nullfor incomplete totals. The box reads the same stored intervals, with no extra history query or database migration.#1546 touches route registration in the same API file. This change only replaces the Energy today mapping in the status handler; it preserves that PR's EV-cost work. The Energy today note uses the existing card, leaving the HTML files shared with #1546 and #1547 alone.
The tester reported this after updating from v0.141.5-beta.1 to v0.141.7-beta.1. The support bundle shows fresh PV and meter readings but contains no daily energy snapshot or history database. The exact gap at that site remains unconfirmed; the failure and recovery path are reproduced with synthetic history.
Verification
make verify— passed outside the sandbox, which blocks local test listeners.npm test— 723 tests passed.Checklist