Open
Conversation
Member
|
Nice one, LGTM |
Contributor
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- Consider marking the
hostparameter asrequired: trueto avoid generating a configuration that cannot work without a host being set.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider marking the `host` parameter as `required: true` to avoid generating a configuration that cannot work without a host being set.
## Individual Comments
### Comment 1
<location path="templates/definition/meter/trydan.yaml" line_range="10" />
<code_context>
+ - name: usage
+ choice: ["grid", "pv", "battery"]
+ required: true
+ - name: host
+ - name: port
+ default: 80
</code_context>
<issue_to_address>
**suggestion (bug_risk):** Consider making `host` required or providing a safe default to avoid invalid URIs
Since `host` is interpolated directly into `http://{{ .host }}:{{ .port }}/RealTimeData`, leaving it unset will generate an invalid URL at runtime. Marking it as `required: true` or giving it a sensible default would prevent this silent misconfiguration and make issues easier to detect.
```suggestion
- name: host
required: true
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Make host required. Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
premultiply
reviewed
Mar 22, 2026
| jq: .FVPower | ||
| {{- end }} | ||
| {{- if eq .usage "grid" }} | ||
| jq: .HousePower - .FVPower |
Author
There was a problem hiding this comment.
Grid power = house power - solar power.
I confirmed that with the readings from V2C APP.
Author
There was a problem hiding this comment.
Yes, that question occurred to me too.
Unfortunately I do not have a battery and cannot test it.
And I have no documentation about that.
It may be jq: .HousePower - .FVPower - .BatteryPower.
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.
This idea sparked in #28169 (comment)
The tests commenced here #28365 (comment) were run with this Trydan meter template.