From bf3759aa05fbb6ea800c7af2a13d5e8769749cfb Mon Sep 17 00:00:00 2001 From: Lutz Bender Date: Thu, 28 Aug 2025 12:26:10 +0200 Subject: [PATCH] command: fix copying charge point template --- packages/helpermodules/command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/helpermodules/command.py b/packages/helpermodules/command.py index 5b1972ce88..2c19972c8d 100644 --- a/packages/helpermodules/command.py +++ b/packages/helpermodules/command.py @@ -366,7 +366,7 @@ def addChargepointTemplate(self, connection_id: str, payload: dict) -> None: self.max_id_chargepoint_template) # if copying a template, copy autolock plans if "data" in payload and "copy" in payload["data"]: - for _, plan in data.data.cp_template_data[f'cpt{payload["data"]["copy"]}'].data.autolock.plans.items(): + for plan in data.data.cp_template_data[f'cpt{payload["data"]["copy"]}'].data.autolock.plans: new_plan = asdict(plan).copy() new_plan["id"] = self.max_id_autolock_plan + 1 Pub().pub(f'openWB/set/chargepoint/template/{new_id}/autolock/{new_plan["id"]}', new_plan)