Repository navigation
docs(output-data): correct savings_total_predbat's description (#3894) - #5081
Merged
Merged
Conversation
The doc claimed savings_total_predbat is "a running total of the below savings_yesterday_predbat sensor" - implying it sums that sensor's own displayed state. It doesn't: the sensor's state is the adjusted saving (factoring in the day's battery-value change), while the total deliberately accumulates the real, unadjusted figure instead - real money saved is what a running total is meant to track. That's not a recently introduced mismatch (output.py has kept the two separate since a very early commit), just never documented as deliberate. #3894 reported exactly the visible symptom: daily bars dip negative on the adjusted state while the total keeps climbing, which reads as inconsistent unless the two are known to be different metrics. Documents that distinction and points to the saving_real / saving_adjusted attributes for anyone who wants to chart either one explicitly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Posted by Claude on behalf of @chalfontchubby.
Problem
docs/output-data.mddescribedpredbat.savings_total_predbatas "a running total... of the belowsavings_yesterday_predbatsensor" - implying it sums that sensor's own displayed state. It never has: the sensor's state is the adjusted saving (factors in the day's battery-value change), while the total accumulates the real, unadjusted figure - deliberately, per @springfall2008 on #3894 ("the total savings is meant to be based on real data, if you use adjusted its not a true savings").That's the root of #3894: a user sees the daily bars dip negative (adjusted) next to a total that keeps climbing (real) and reasonably expects them to reconcile, because the docs said they would.
Supersedes #5061, which took the opposite approach (make the total match the adjusted figure) - closed once the maintainer confirmed the total's real-data semantics are intentional, not a bug.
Change
Corrects the description and adds a note explaining the real/adjusted split, pointing to the
saving_real/saving_adjustedattributes already published onsavings_yesterday_predbatfor anyone who wants to chart either figure explicitly.Follow-up
A separate, still-open question on #3894: whether
savings_yesterday_predbat's own displayed state should switch to the real figure, so the daily and total charts visibly reconcile. Left for the maintainer to decide - not touched here.🤖 Generated with Claude Code