Template Meter Add: Eltako Modbus#31127
Conversation
There was a problem hiding this comment.
Hey - I've found 3 issues, and left some high level feedback:
- The
usageparameter is defined but never referenced in therendersection; consider either using it (e.g., to specialize behavior per usage) or removing it to avoid confusion. - In
requirements.description.dethere is a typo (weerden→werden), which might confuse users reading the German description. - The
requirements.descriptionis currently only provided in German; consider adding an English variant for consistency with the rest of the template metadata.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `usage` parameter is defined but never referenced in the `render` section; consider either using it (e.g., to specialize behavior per usage) or removing it to avoid confusion.
- In `requirements.description.de` there is a typo (`weerden` → `werden`), which might confuse users reading the German description.
- The `requirements.description` is currently only provided in German; consider adding an English variant for consistency with the rest of the template metadata.
## Individual Comments
### Comment 1
<location path="templates/definition/meter/eltako-modbus.yaml" line_range="9-10" />
<code_context>
+ description:
+ de: |
+ Getestet zusammen mit dem Modbus-Gateway von Eltako (ZGW16-IP)
+ Im Gateway müssen folgende Register aktiviert weerden: 30001, 30003, 30005, 30007, 30009, 30011, 30013, 30015, 30017, 30053, 30073, 30075
+params:
+ - name: usage
</code_context>
<issue_to_address>
**suggestion (typo):** Fix the spelling of "weerden" in the German description.
"weerden" appears to be a typo and should be "werden" to keep the German description clear and professional for users.
```suggestion
Getestet zusammen mit dem Modbus-Gateway von Eltako (ZGW16-IP)
Im Gateway müssen folgende Register aktiviert werden: 30001, 30003, 30005, 30007, 30009, 30011, 30013, 30015, 30017, 30053, 30073, 30075
```
</issue_to_address>
### Comment 2
<location path="templates/definition/meter/eltako-modbus.yaml" line_range="34-43" />
<code_context>
+ decode: int32
+ timeout: 2s
+
+ energy: # meter in kwh
+ source: modbus
+ id: {{ .meter_id }}
+ uri: {{ joinHostPort .host .port }}
+ register:
+ address: 72
+ type: input
+ decode: int32
+ timeout: 2s
+ scale: 0.01
+ returnenergy: # meter in kwh
+ source: modbus
+ id: {{ .meter_id }}
</code_context>
<issue_to_address>
**nitpick (typo):** Correct the unit casing from kwh to kWh in comments.
Suggested implementation:
```
energy: # meter in kWh
```
```
returnenergy: # meter in kWh
```
</issue_to_address>
### Comment 3
<location path="templates/definition/meter/eltako-modbus.yaml" line_range="10" />
<code_context>
+ description:
+ de: |
+ Getestet zusammen mit dem Modbus-Gateway von Eltako (ZGW16-IP)
+ Im Gateway müssen folgende Register aktiviert weerden: 30001, 30003, 30005, 30007, 30009, 30011, 30013, 30015, 30017, 30053, 30073, 30075
+params:
+ - name: usage
</code_context>
<issue_to_address>
**issue (review_instructions):** Typo in German description ("weerden" → "werden"), which breaks wording consistency with other templates.
The German sentence has a typo: "weerden" should be "werden". Please adjust the wording so it’s consistent with the style and correctness of other templates’ localized descriptions.
<details>
<summary>Review instructions:</summary>
**Path patterns:** `templates/**/*.yaml`
**Instructions:**
Verify that the changes comply to the rules defined in templates/README.md. Also check consistence (wording) with other files inside templates directory.
</details>
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
What can I do to solve the failing check? |
|
See https://github.com/evcc-io/evcc/blob/master/CONTRIBUTING.md#device-templates for testing plus PR must be green. |
|
@andig
Maybe the error reporting of the check could be improved. |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The
usageparameter is defined but never referenced in the rendered config; either wire it into the template (e.g., for conditional behavior) or remove it to avoid confusion. - The modbus connection block (
source,id,uri,timeout) is repeated many times; consider using YAML anchors or a helper pattern to reduce duplication and make future changes less error-prone.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `usage` parameter is defined but never referenced in the rendered config; either wire it into the template (e.g., for conditional behavior) or remove it to avoid confusion.
- The modbus connection block (`source`, `id`, `uri`, `timeout`) is repeated many times; consider using YAML anchors or a helper pattern to reduce duplication and make future changes less error-prone.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| decode: int32 | ||
| scale: 0.01 | ||
|
|
||
| powers: # phase powers in W |
There was a problem hiding this comment.
Are currents signed? Then powers should be removed.
There was a problem hiding this comment.
So? They're not used for anything.
There was a problem hiding this comment.
Personally I'm interested in this and evcc already shows them for my Sunny Home Manager aswell.
I would suggest to make the power readings per phase optional.
You can run linting and locally which will tell you exactly. Or use VScode with recommended plugins to produce „clean“ files. |
|
We should implement it in mbmd (upstream) and just implement like other mbmd meter template. |
Is it possible to test this like a template without mbmd? |
|
Replaced by #31197 |



Hi,
here's a proposal for a template for Eltako Modbus meters.
I had no change to test this template directly, but tested the connection with a custom device in evcc.
Greetings
Jens