diff --git a/packages/control/chargepoint/chargepoint.py b/packages/control/chargepoint/chargepoint.py index c2b25b1922..ef32eadf34 100644 --- a/packages/control/chargepoint/chargepoint.py +++ b/packages/control/chargepoint/chargepoint.py @@ -41,7 +41,7 @@ def get_chargepoint_config_default() -> dict: return { - "name": "Standard-Ladepunkt", + "name": "neuer Ladepunkt", "type": None, "ev": 0, "template": 0, diff --git a/packages/control/chargepoint/chargepoint_data.py b/packages/control/chargepoint/chargepoint_data.py index 0388566936..5bf8c94f5d 100644 --- a/packages/control/chargepoint/chargepoint_data.py +++ b/packages/control/chargepoint/chargepoint_data.py @@ -139,7 +139,7 @@ class Set: class Config: configuration: Dict = field(default_factory=empty_dict_factory) ev: int = 0 - name: str = "Standard-Ladepunkt" + name: str = "neuer Ladepunkt" type: Optional[str] = None template: int = 0 connected_phases: int = 3 diff --git a/packages/control/chargepoint/chargepoint_template.py b/packages/control/chargepoint/chargepoint_template.py index 736a0e6f48..acb6879e70 100644 --- a/packages/control/chargepoint/chargepoint_template.py +++ b/packages/control/chargepoint/chargepoint_template.py @@ -40,7 +40,7 @@ class CpTemplateData: id: int = 0 max_current_multi_phases: int = 32 max_current_single_phase: int = 32 - name: str = "Standard Ladepunkt-Profil" + name: str = "neues Ladepunkt-Profil" rfid_enabling: bool = False valid_tags: List = field(default_factory=empty_list_factory) diff --git a/packages/control/ev.py b/packages/control/ev.py index 6c8e173294..2676093715 100644 --- a/packages/control/ev.py +++ b/packages/control/ev.py @@ -28,18 +28,25 @@ def get_vehicle_default() -> dict: return { "charge_template": 0, "ev_template": 0, - "name": "Standard-Fahrzeug", + "name": "neues Fahrzeug", "tag_id": [], "get/soc": 0 } -def get_charge_template_default() -> dict: +def get_new_charge_template() -> dict: ct_default = asdict(ChargeTemplateData()) ct_default["chargemode"]["scheduled_charging"].pop("plans") ct_default["time_charging"].pop("plans") return ct_default + +def get_charge_template_default() -> dict: + ct_default = asdict(ChargeTemplateData(name="Lade-Profil")) + ct_default["chargemode"]["scheduled_charging"].pop("plans") + ct_default["time_charging"].pop("plans") + return ct_default + # Avoid anti-pattern: mutable default arguments @@ -109,7 +116,7 @@ def et_factory() -> Et: @dataclass class ChargeTemplateData: - name: str = "Standard-Lade-Profil" + name: str = "neues Lade-Profil" disable_after_unplug: bool = False prio: bool = False load_default: bool = False @@ -120,7 +127,7 @@ class ChargeTemplateData: @dataclass class EvTemplateData: - name: str = "Standard-Fahrzeug-Profil" + name: str = "neues Fahrzeug-Profil" max_current_multi_phases: int = 16 max_phases: int = 3 phase_switch_pause: int = 2 @@ -182,7 +189,7 @@ class EvData: set: Set = field(default_factory=set_factory) charge_template: int = 0 ev_template: int = 0 - name: str = "Standard-Fahrzeug" + name: str = "neues Fahrzeug" tag_id: List[str] = field(default_factory=empty_list_factory) get: Get = field(default_factory=get_factory) diff --git a/packages/control/ev_charge_template_test.py b/packages/control/ev_charge_template_test.py index a990f892a2..22be9e628f 100644 --- a/packages/control/ev_charge_template_test.py +++ b/packages/control/ev_charge_template_test.py @@ -26,24 +26,24 @@ def data_module() -> None: pytest.param({"0": TimeChargingPlan()}, 0, 0, None, (0, "stop", ChargeTemplate.TIME_CHARGING_NO_PLAN_ACTIVE, None), id="no plan active"), pytest.param({"0": TimeChargingPlan()}, 0, 0, TimeChargingPlan(), - (16, "time_charging", None, "Zeitladen-Standard"), id="plan active"), + (16, "time_charging", None, "neuer Zeitladen-Plan"), id="plan active"), pytest.param({"0": TimeChargingPlan(limit=Limit(selected="soc"))}, 100, 0, TimeChargingPlan(limit=Limit(selected="soc")), - (0, "stop", ChargeTemplate.TIME_CHARGING_SOC_REACHED, "Zeitladen-Standard"), + (0, "stop", ChargeTemplate.TIME_CHARGING_SOC_REACHED, "neuer Zeitladen-Plan"), id="plan active, soc is reached"), pytest.param({"0": TimeChargingPlan(limit=Limit(selected="soc"))}, 40, 0, TimeChargingPlan(limit=Limit(selected="soc")), - (16, "time_charging", None, "Zeitladen-Standard"), id="plan active, soc is not reached"), + (16, "time_charging", None, "neuer Zeitladen-Plan"), id="plan active, soc is not reached"), pytest.param({"0": TimeChargingPlan(limit=Limit(selected="soc"))}, None, 0, TimeChargingPlan(limit=Limit(selected="soc")), - (16, "time_charging", None, "Zeitladen-Standard"), id="plan active, soc is not defined"), + (16, "time_charging", None, "neuer Zeitladen-Plan"), id="plan active, soc is not defined"), pytest.param({"0": TimeChargingPlan(limit=Limit(selected="amount"))}, 0, 1500, TimeChargingPlan(limit=Limit(selected="amount")), - (0, "stop", ChargeTemplate.TIME_CHARGING_AMOUNT_REACHED, "Zeitladen-Standard"), + (0, "stop", ChargeTemplate.TIME_CHARGING_AMOUNT_REACHED, "neuer Zeitladen-Plan"), id="plan active, used_amount_time_charging is reached"), pytest.param({"0": TimeChargingPlan(limit=Limit(selected="amount"))}, 0, 500, TimeChargingPlan(limit=Limit(selected="amount")), - (16, "time_charging", None, "Zeitladen-Standard"), + (16, "time_charging", None, "neuer Zeitladen-Plan"), id="plan active, used_amount_time_charging is not reached"), pytest.param({"0": TimeChargingPlan()}, 0, 0, None, (0, "stop", ChargeTemplate.TIME_CHARGING_NO_PLAN_ACTIVE, None), id="plan defined but not found"), diff --git a/packages/helpermodules/abstract_plans.py b/packages/helpermodules/abstract_plans.py index 77fa3752d4..0e2967cfe8 100644 --- a/packages/helpermodules/abstract_plans.py +++ b/packages/helpermodules/abstract_plans.py @@ -62,18 +62,18 @@ class TimeframePlan(PlanBase): @dataclass class ScheduledChargingPlan(PlanBase): current: int = 14 - name: str = "Zielladen-Standard" + name: str = "neuer Zielladen-Plan" limit: ScheduledLimit = field(default_factory=scheduled_limit_factory) time: str = "07:00" # ToDo: aktuelle Zeit verwenden @dataclass class TimeChargingPlan(TimeframePlan): - name: str = "Zeitladen-Standard" + name: str = "neuer Zeitladen-Plan" current: int = 16 limit: Limit = field(default_factory=limit_factory) @dataclass class AutolockPlan(TimeframePlan): - name: str = "Standard Autolock-Plan" + name: str = "neuer Autolock-Plan" diff --git a/packages/helpermodules/command.py b/packages/helpermodules/command.py index c296478a15..14016588c1 100644 --- a/packages/helpermodules/command.py +++ b/packages/helpermodules/command.py @@ -328,7 +328,7 @@ def addChargeTemplate(self, connection_id: str, payload: dict) -> None: """ sendet das Topic, zu dem ein neues Lade-Profil erstellt werden soll. """ new_id = self.max_id_charge_template + 1 - charge_template_default = ev.get_charge_template_default() + charge_template_default = ev.get_new_charge_template() Pub().pub("openWB/set/vehicle/template/charge_template/" + str(new_id), charge_template_default) self.max_id_charge_template = new_id diff --git a/packages/helpermodules/measurement_logging/write_log_test.py b/packages/helpermodules/measurement_logging/write_log_test.py index 64d05f7a76..a491716c85 100644 --- a/packages/helpermodules/measurement_logging/write_log_test.py +++ b/packages/helpermodules/measurement_logging/write_log_test.py @@ -15,9 +15,9 @@ def test_get_names(daily_log_totals, monkeypatch): assert names == {'bat2': "Speicher", 'counter0': "Zähler", 'cp3': "cp3", - 'cp4': "Standard-Ladepunkt", - 'cp5': "Standard-Ladepunkt", - 'cp6': "Standard-Ladepunkt", + 'cp4': "neuer Ladepunkt", + 'cp5': "neuer Ladepunkt", + 'cp6': "neuer Ladepunkt", 'pv1': "Wechselrichter", "sh1": "Smarthome1"} diff --git a/packages/helpermodules/update_config.py b/packages/helpermodules/update_config.py index 8290151aa0..89a65b76f4 100644 --- a/packages/helpermodules/update_config.py +++ b/packages/helpermodules/update_config.py @@ -409,14 +409,14 @@ class UpdateConfig: ("openWB/chargepoint/template/0", get_chargepoint_template_default()), ("openWB/counter/get/hierarchy", []), ("openWB/counter/config/reserve_for_not_charging", counter_all.Config().reserve_for_not_charging), - ("openWB/vehicle/0/name", ev.EvData().name), + ("openWB/vehicle/0/name", "Standard-Fahrzeug"), ("openWB/vehicle/0/charge_template", ev.Ev(0).charge_template.ct_num), ("openWB/vehicle/0/soc_module/config", NO_MODULE), ("openWB/vehicle/0/soc_module/general_config", dataclass_utils.asdict(GeneralVehicleConfig())), ("openWB/vehicle/0/ev_template", ev.Ev(0).ev_template.et_num), ("openWB/vehicle/0/tag_id", ev.Ev(0).data.tag_id), ("openWB/vehicle/0/get/soc", ev.Ev(0).data.get.soc), - ("openWB/vehicle/template/ev_template/0", asdict(ev.EvTemplateData(min_current=10))), + ("openWB/vehicle/template/ev_template/0", asdict(ev.EvTemplateData(name="Fahrzeug-Profil", min_current=10))), ("openWB/vehicle/template/charge_template/0", ev.get_charge_template_default()), ("openWB/general/chargemode_config/instant_charging/phases_to_use", 3), ("openWB/general/chargemode_config/pv_charging/bat_mode", BatConsiderationMode.EV_MODE.value),