From 14bfec15acd95bf13ed0b69ac260c48ba8935aff Mon Sep 17 00:00:00 2001 From: Andreas Linde Date: Sat, 29 Jan 2022 16:44:48 +0100 Subject: [PATCH] Add Amtron templates --- charger/template_test.go | 2 +- templates/definition/charger/amtron.yaml | 16 ++++++++++++++++ templates/docs/charger/amtron_0.yaml | 14 ++++++++++++++ templates/docs/charger/amtron_1.yaml | 14 ++++++++++++++ 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 templates/definition/charger/amtron.yaml create mode 100644 templates/docs/charger/amtron_0.yaml create mode 100644 templates/docs/charger/amtron_1.yaml diff --git a/charger/template_test.go b/charger/template_test.go index 98424fca6..aba9f5bb1 100644 --- a/charger/template_test.go +++ b/charger/template_test.go @@ -50,7 +50,7 @@ func TestChargerTemplates(t *testing.T) { } else { values[templates.ModbusKeyRS485TCPIP] = true } - values = tmpl.ModbusValues(templates.TemplateRenderModeUnitTest, true, values) + values = tmpl.ModbusValues(templates.TemplateRenderModeInstance, true, values) } t.Run(tmpl.Template, func(t *testing.T) { diff --git a/templates/definition/charger/amtron.yaml b/templates/definition/charger/amtron.yaml new file mode 100644 index 000000000..9978ef6f5 --- /dev/null +++ b/templates/definition/charger/amtron.yaml @@ -0,0 +1,16 @@ +template: amtron +products: +- brand: Mennekes + description: + generic: AMTRON XTRA +- brand: Mennekes + description: + generic: AMTRON PREMIUM +requirements: + evcc: ["sponsorship"] +params: +- name: modbus + choice: ["tcpip"] +render: | + type: amtron + {{include "modbus" .}} diff --git a/templates/docs/charger/amtron_0.yaml b/templates/docs/charger/amtron_0.yaml new file mode 100644 index 000000000..922467959 --- /dev/null +++ b/templates/docs/charger/amtron_0.yaml @@ -0,0 +1,14 @@ +product: + brand: Mennekes + description: AMTRON XTRA +requirements: ["sponsorship"] + +render: +- default: | + type: template + template: amtron + # Modbus Start + id: 1 + # TCPIP + uri: 192.0.2.2:502 # IP-Adresse oder Hostname: Port + # Modbus End \ No newline at end of file diff --git a/templates/docs/charger/amtron_1.yaml b/templates/docs/charger/amtron_1.yaml new file mode 100644 index 000000000..624addff9 --- /dev/null +++ b/templates/docs/charger/amtron_1.yaml @@ -0,0 +1,14 @@ +product: + brand: Mennekes + description: AMTRON PREMIUM +requirements: ["sponsorship"] + +render: +- default: | + type: template + template: amtron + # Modbus Start + id: 1 + # TCPIP + uri: 192.0.2.2:502 # IP-Adresse oder Hostname: Port + # Modbus End \ No newline at end of file