Skip to content

Commit

Permalink
Kostal Plenticore: fix template
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Mar 21, 2022
1 parent f050e05 commit 7dabe4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions meter/template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func TestTemplates(t *testing.T) {

templates.RenderTest(t, tmpl, values, func(values map[string]interface{}) {
if _, err := NewFromConfig("template", values); err != nil && !test.Acceptable(err, acceptable) {
t.Log(values)
t.Error(err)
}
})
Expand Down
6 changes: 3 additions & 3 deletions templates/definition/meter/kostal-plenticore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ render: |
{{- if eq .usage "pv" }}
type: custom
power:
type: calc
source: calc
add: # The add plugin sums up both string values
- type: modbus
- source: modbus
model: sunspec
{{ include "modbus" . | indent 4 }}
value: 160:1:DCW # string 1
- type: modbus
- source: modbus
model: sunspec
{{ include "modbus" . | indent 4 }}
value: 160:2:DCW # string 2
Expand Down

0 comments on commit 7dabe4b

Please sign in to comment.