From 92f38b2f503654e78d66dfbc64b1f56a3cb62327 Mon Sep 17 00:00:00 2001 From: globalnamespace Date: Sat, 9 Nov 2024 17:34:43 -0600 Subject: [PATCH] Fix repeat value placement for zone cleaning payload in valetudo template --- src/model/generators/platform_templates/hypfer_valetudo.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/model/generators/platform_templates/hypfer_valetudo.json b/src/model/generators/platform_templates/hypfer_valetudo.json index 1ebf214e..00ae9ac0 100644 --- a/src/model/generators/platform_templates/hypfer_valetudo.json +++ b/src/model/generators/platform_templates/hypfer_valetudo.json @@ -33,7 +33,7 @@ "evaluate_data_as_template": true, "service_data": { "topic": "[[topic]]/ZoneCleaningCapability/start/set", - "payload": "{\"zones\": [{%for s in ('[[selection]]')|from_json %}{ \"points\": {\"pA\": { \"x\": {{s[0]}}, \"y\": {{s[1]}} }, \"pB\": { \"x\": {{s[2]}}, \"y\": {{s[1]}} }, \"pC\": { \"x\": {{s[2]}}, \"y\": {{s[3]}} }, \"pD\": { \"x\": {{s[0]}}, \"y\": {{s[3]}} } }, \"iterations\": [[repeats]]}{%if not loop.last%},{%endif%}{%endfor%}]}" + "payload": "{\"zones\": [{%for s in ('[[selection]]')|from_json %}{ \"points\": {\"pA\": { \"x\": {{s[0]}}, \"y\": {{s[1]}} }, \"pB\": { \"x\": {{s[2]}}, \"y\": {{s[1]}} }, \"pC\": { \"x\": {{s[2]}}, \"y\": {{s[3]}} }, \"pD\": { \"x\": {{s[0]}}, \"y\": {{s[3]}} } } }{%if not loop.last%},{%endif%}{%endfor%}], \"iterations\": [[repeats]]}" } } }, @@ -48,7 +48,7 @@ "evaluate_data_as_template": true, "service_data": { "topic": "[[topic]]/ZoneCleaningCapability/start/set", - "payload": "{\"zones\": [{%for s in ('[[selection]]')|from_json %}{ \"points\": {\"pA\": { \"x\": {{s[0]}}, \"y\": {{s[1]}} }, \"pB\": { \"x\": {{s[2]}}, \"y\": {{s[1]}} }, \"pC\": { \"x\": {{s[2]}}, \"y\": {{s[3]}} }, \"pD\": { \"x\": {{s[0]}}, \"y\": {{s[3]}} } }, \"iterations\": [[repeats]]}{%if not loop.last%},{%endif%}{%endfor%}]}" + "payload": "{\"zones\": [{%for s in ('[[selection]]')|from_json %}{ \"points\": {\"pA\": { \"x\": {{s[0]}}, \"y\": {{s[1]}} }, \"pB\": { \"x\": {{s[2]}}, \"y\": {{s[1]}} }, \"pC\": { \"x\": {{s[2]}}, \"y\": {{s[3]}} }, \"pD\": { \"x\": {{s[0]}}, \"y\": {{s[3]}} } } }{%if not loop.last%},{%endif%}{%endfor%}], \"iterations\": [[repeats]]}" } } },