From 6826b9ed4400ad3f7b4e2488734c6b7037d8302c Mon Sep 17 00:00:00 2001 From: LKuemmel Date: Fri, 24 May 2024 13:52:49 +0200 Subject: [PATCH] clean up --- .../control/chargepoint/chargepoint_all.py | 10 +++---- .../control/chargepoint/control_parameter.py | 28 +++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/control/chargepoint/chargepoint_all.py b/packages/control/chargepoint/chargepoint_all.py index 8d6d5f31e2..154bb26f92 100644 --- a/packages/control/chargepoint/chargepoint_all.py +++ b/packages/control/chargepoint/chargepoint_all.py @@ -10,11 +10,11 @@ @dataclass class AllGet: - daily_imported: float = field(default=0, metadata={"topic": "get/daily_imported", "mutable_by_algorithm": True}) - daily_exported: float = field(default=0, metadata={"topic": "get/daily_exported", "mutable_by_algorithm": True}) - power: float = field(default=0, metadata={"topic": "get/power", "mutable_by_algorithm": True}) - imported: float = field(default=0, metadata={"topic": "get/imported", "mutable_by_algorithm": True}) - exported: float = field(default=0, metadata={"topic": "get/exported", "mutable_by_algorithm": True}) + daily_imported: float = field(default=0, metadata={"topic": "get/daily_imported"}) + daily_exported: float = field(default=0, metadata={"topic": "get/daily_exported"}) + power: float = field(default=0, metadata={"topic": "get/power"}) + imported: float = field(default=0, metadata={"topic": "get/imported"}) + exported: float = field(default=0, metadata={"topic": "get/exported"}) def all_get_factory() -> AllGet: diff --git a/packages/control/chargepoint/control_parameter.py b/packages/control/chargepoint/control_parameter.py index fc151b9e7b..456bbcc8da 100644 --- a/packages/control/chargepoint/control_parameter.py +++ b/packages/control/chargepoint/control_parameter.py @@ -11,48 +11,48 @@ class ControlParameter: chargemode: Chargemode_enum = field( default=Chargemode_enum.STOP, - metadata={"topic": "control_parameter/chargemode", "mutable_by_algorithm": True}) + metadata={"topic": "control_parameter/chargemode"}) current_plan: Optional[str] = field( default=None, - metadata={"topic": "control_parameter/current_plan", "mutable_by_algorithm": True}) + metadata={"topic": "control_parameter/current_plan"}) failed_phase_switches: int = field( default=0, - metadata={"topic": "control_parameter/failed_phase_switches", "mutable_by_algorithm": True}) + metadata={"topic": "control_parameter/failed_phase_switches"}) imported_at_plan_start: Optional[float] = field( default=None, - metadata={"topic": "control_parameter/imported_at_plan_start", "mutable_by_algorithm": True}) + metadata={"topic": "control_parameter/imported_at_plan_start"}) imported_instant_charging: Optional[float] = field( default=None, - metadata={"topic": "control_parameter/imported_instant_charging", "mutable_by_algorithm": True}) + metadata={"topic": "control_parameter/imported_instant_charging"}) limit: Optional[LimitingValue] = field( default=None, - metadata={"topic": "control_parameter/limit", "mutable_by_algorithm": True}) + metadata={"topic": "control_parameter/limit"}) phases: int = field( default=0, - metadata={"topic": "control_parameter/phases", "mutable_by_algorithm": True}) + metadata={"topic": "control_parameter/phases"}) prio: bool = field( default=False, - metadata={"topic": "control_parameter/prio", "mutable_by_algorithm": True}) + metadata={"topic": "control_parameter/prio"}) required_current: float = field( default=0, - metadata={"topic": "control_parameter/required_current", "mutable_by_algorithm": True}) + metadata={"topic": "control_parameter/required_current"}) required_currents: List[float] = field( default_factory=currents_list_factory) state: ChargepointState = field( default=ChargepointState.NO_CHARGING_ALLOWED, - metadata={"topic": "control_parameter/state", "mutable_by_algorithm": True}) + metadata={"topic": "control_parameter/state"}) submode: Chargemode_enum = field( default=Chargemode_enum.STOP, - metadata={"topic": "control_parameter/submode", "mutable_by_algorithm": True}) + metadata={"topic": "control_parameter/submode"}) timestamp_auto_phase_switch: Optional[float] = field( default=None, - metadata={"topic": "control_parameter/timestamp_auto_phase_switch", "mutable_by_algorithm": True}) + metadata={"topic": "control_parameter/timestamp_auto_phase_switch"}) timestamp_perform_phase_switch: Optional[float] = field( default=None, - metadata={"topic": "control_parameter/timestamp_perform_phase_switch", "mutable_by_algorithm": True}) + metadata={"topic": "control_parameter/timestamp_perform_phase_switch"}) timestamp_switch_on_off: Optional[float] = field( default=None, - metadata={"topic": "control_parameter/timestamp_switch_on_off", "mutable_by_algorithm": True}) + metadata={"topic": "control_parameter/timestamp_switch_on_off"}) def control_parameter_factory() -> ControlParameter: