Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions packages/modules/chargepoints/smartwb/chargepoint_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def __init__(self, config: SmartWB) -> None:
"Ladepunkt", "chargepoint"))
self.client_error_context = ErrorTimerContext(
f"openWB/set/chargepoint/{self.config.id}/get/error_timestamp", CP_ERROR, hide_exception=True)
self.old_phases_in_use = 1
self.session = req.get_http_session()

def set_current(self, current: float) -> None:
Expand Down Expand Up @@ -57,9 +56,7 @@ def get_values(self) -> None:

phases_in_use = sum(1 for current in 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
phases_in_use = None

if json_rsp.get("voltageP1"):
voltages = [json_rsp["voltageP1"], json_rsp["voltageP2"], json_rsp["voltageP3"]]
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/chargepoints/smartwb/smartwb_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class TestSmartWb:
charge_state=True,
rfid="0a1b2c3d",
rfid_timestamp=1652683252,
phases_in_use=1,
phases_in_use=None,
serial_number="94:B9:7E:69:F0:D1",
max_evse_current=16
)
Expand Down
3 changes: 2 additions & 1 deletion packages/modules/common/store/_chargepoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ def update(self):
pub_to_broker("openWB/set/chargepoint/" + str(self.num) + "/get/power", self.state.power, 2)
pub_to_broker("openWB/set/chargepoint/" + str(self.num) + "/get/powers", self.state.powers, 2)
pub_to_broker("openWB/set/chargepoint/" + str(self.num) + "/get/frequency", self.state.frequency, 2)
pub_to_broker("openWB/set/chargepoint/" + str(self.num) + "/get/phases_in_use", self.state.phases_in_use, 2)
if self.state.phases_in_use:
pub_to_broker("openWB/set/chargepoint/" + str(self.num) + "/get/phases_in_use", self.state.phases_in_use, 2)
pub_to_broker("openWB/set/chargepoint/" + str(self.num) + "/get/charge_state", self.state.charge_state, 2)
pub_to_broker("openWB/set/chargepoint/" + str(self.num) + "/get/plug_state", self.state.plug_state, 2)
pub_to_broker("openWB/set/chargepoint/" + str(self.num) + "/get/rfid", self.state.rfid)
Expand Down