Handle %-scaled charge/discharge rate entities during inverter calibration and control writes - #4675
Closed
springfall2008 with Copilot wants to merge 2 commits into
Closed
Handle %-scaled charge/discharge rate entities during inverter calibration and control writes#4675springfall2008 with Copilot wants to merge 2 commits into
springfall2008 with Copilot wants to merge 2 commits into
Conversation
Co-authored-by: springfall2008 <48591903+springfall2008@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix charge_rate/discharge_rate calibration writes for percentage scaling
Handle %-scaled charge/discharge rate entities during inverter calibration and control writes
Aug 23, 2026
Owner
|
Closing as there is already a percent setting |
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.
Predbat assumed
charge_rate/discharge_rateentities were watt-scaled and wrote raw W values during calibration/control. For integrations exposing signed/percent controls (e.g.-100..100 %), this causedservice_validation_errorwrites and persistent unit-mismatch noise.Rate unit detection + conversion path
%-entity detection for configuredcharge_rate/discharge_rateentities.% -> W(for internal control logic)W -> %(for service writes)Signed percent discharge handling
min < 0 < max), discharge writes are sign-adjusted (negative) and clamped to entity bounds.Control-loop integration points
get_current_charge_rateget_current_discharge_rateadjust_charge_rateadjust_discharge_rateRegression coverage
%-scaled rate entity mapped viacharge_rate/discharge_rate, verifying correct charge (+%) and discharge (-%) writes.