|
16 | 16 | from control.chargepoint.chargepoint_template import get_autolock_plan_default, get_chargepoint_template_default |
17 | 17 |
|
18 | 18 | # ToDo: move to module commands if implemented |
| 19 | +from control.ev.charge_template import get_new_charge_template |
| 20 | +from control.ev.ev_template import EvTemplateData |
19 | 21 | from helpermodules import pub |
20 | 22 | from helpermodules.abstract_plans import ScheduledChargingPlan, TimeChargingPlan |
21 | 23 | from helpermodules.utils.run_command import run_command |
@@ -335,7 +337,7 @@ def addChargeTemplate(self, connection_id: str, payload: dict) -> None: |
335 | 337 | """ sendet das Topic, zu dem ein neues Lade-Profil erstellt werden soll. |
336 | 338 | """ |
337 | 339 | new_id = self.max_id_charge_template + 1 |
338 | | - charge_template_default = ev.get_new_charge_template() |
| 340 | + charge_template_default = get_new_charge_template() |
339 | 341 | Pub().pub("openWB/set/vehicle/template/charge_template/" + |
340 | 342 | str(new_id), charge_template_default) |
341 | 343 | self.max_id_charge_template = new_id |
@@ -487,7 +489,7 @@ def addEvTemplate(self, connection_id: str, payload: dict) -> None: |
487 | 489 | """ sendet das Topic, zu dem ein neues Fahrzeug-Profil erstellt werden soll. |
488 | 490 | """ |
489 | 491 | new_id = self.max_id_ev_template + 1 |
490 | | - ev_template_default = dataclass_utils.asdict(ev.EvTemplateData()) |
| 492 | + ev_template_default = dataclass_utils.asdict(EvTemplateData()) |
491 | 493 | Pub().pub(f'openWB/set/vehicle/template/ev_template/{new_id}', ev_template_default) |
492 | 494 | self.max_id_ev_template = new_id |
493 | 495 | Pub().pub("openWB/set/command/max_id/ev_template", new_id) |
|
0 commit comments