From 98b1f10352ce9140b303154eeec73005b5d33ffd Mon Sep 17 00:00:00 2001 From: LKuemmel Date: Tue, 25 Nov 2025 12:01:34 +0100 Subject: [PATCH] fix satellite: phases in use --- .../openwb_series2_satellit/chargepoint_module.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/modules/chargepoints/openwb_series2_satellit/chargepoint_module.py b/packages/modules/chargepoints/openwb_series2_satellit/chargepoint_module.py index c88d64446b..d615b8a96c 100644 --- a/packages/modules/chargepoints/openwb_series2_satellit/chargepoint_module.py +++ b/packages/modules/chargepoints/openwb_series2_satellit/chargepoint_module.py @@ -42,6 +42,7 @@ def __init__(self, config: OpenWBseries2Satellit) -> None: f"openWB/set/chargepoint/{self.config.id}/get/error_timestamp", CP_ERROR, hide_exception=True) self._create_client() self._validate_version() + self.old_phases_in_use = 3 def delay_second_cp(self, delay: float): if self.config.configuration.duo_num == 0: @@ -82,12 +83,15 @@ def get_values(self) -> None: if self.version is False: self._validate_version() - currents = counter_state.currents - phases_in_use = sum(1 for current in currents if current > 3) + phases_in_use = sum(1 for current in counter_state.currents if current > 3) + if phases_in_use == 0: + phases_in_use = self.old_phases_in_use + else: + self.old_phases_in_use = phases_in_use chargepoint_state = ChargepointState( power=counter_state.power, - currents=currents, + currents=counter_state.currents, imported=counter_state.imported, exported=0, voltages=counter_state.voltages, @@ -106,7 +110,7 @@ def get_values(self) -> None: chargepoint_state = ChargepointState( plug_state=None, charge_state=False, imported=None, # bei im-/exported None werden keine Werte gepublished - exported=None, phases_in_use=0, power=0, currents=[0]*3) + exported=None, phases_in_use=self.old_phases_in_use, power=0, currents=[0]*3) self.store.set(chargepoint_state) except AttributeError: self._create_client()