Repository navigation
FNN: no export limit for S1/S2 without generator power - #36544
Merged
Merged
Conversation
premultiply
marked this pull request as ready for review
November 24, 2026 04:59
Contributor
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="hems/fnn/fnn.go" line_range="292-293" />
<code_context>
}
+ // without generator power a partial limit cannot be converted to watts
+ if c.productionPercent > 0 && c.productionNominalMax <= 0 {
+ return nil
+ }
+
</code_context>
<issue_to_address>
**Session history shows false zero cap**
When an S1 or S2 signal is active while `productionNominalMax` is missing, `setProductionLimit` computes a zero `limit` and passes it to `smartgrid.UpdateSession`, which stores it as `GridSession.LimitPower`; returning nil from `MaxProductionPower` only removes the optimizer input, so session history and exports report a zero-watt cap that was not applied.
Prevent `setProductionLimit` from storing a zero-watt cap when the nominal production power is missing.
</issue_to_address>
### Comment 2
<location path="hems/fnn/fnn.go" line_range="99" />
<code_context>
}
+ if w3G != nil && productionNominalMax <= 0 {
+ c.log.WARN.Println("productionnominalmax not configured, S1/S2 feed-in limits are not applied to the grid export")
+ }
+
</code_context>
<issue_to_address>
**W3-only setups get irrelevant warning**
When W3 is configured without `productionNominalMax`, while S1 and S2 are both unconfigured, the warning is emitted even though no S1/S2 feed-in limits are configured, so W3-only setups see a warning about limits they do not use.
Emit the warning only when S1 or S2 is configured and `productionNominalMax` is missing.
</issue_to_address>
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.
refs #36515
Without
productionnominalmax, an active S1 or S2 signal made the FNN HEMS report a 0 W production limit, which the optimizer applies as a hard zero-export cap instead of 60% or 30% of the installed power. The parameter is optional in all FNN templates, so this affects existing setups.productionnominalmaxnow fails at startup instead of silently applying a wrong limit.productionnominalmax; the deprecatedmaxproductionpower/maxcurtailpowerstill count as generator power.🤖 Generated with Claude Code