Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

Commit 06ab506

Browse files
committed
added a parameter for number of connected phases
1 parent c1789f4 commit 06ab506

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/goechargerv2/goecharger.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def value_or_null(array, index):
5151
post_contactor_l1 = value_or_null(phase, 5)
5252

5353
phase_switch_mode = status.get("psm", 0)
54+
phases_number_connected = status.get("pnp", 0)
5455

5556
if len(status.get("tma", [])) > 0:
5657
t_0 = float(value_or_null(status.get("tma", []), GoeChargerApi.TMA_0))
@@ -117,6 +118,7 @@ def value_or_null(array, index):
117118
"post_contactor_l2": post_contactor_l2,
118119
"post_contactor_l3": post_contactor_l3,
119120
"phase_switch_mode": phase_switch_mode,
121+
"phases_number_connected": phases_number_connected,
120122
"charger_temp": charger_temp, # Deprecated: Just for chargers with old firmware
121123
"charger_temp0": round(
122124
float(value_or_null(status.get("tma", []), GoeChargerApi.TMA_0)), 2

tests/goecharger.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"ust": 0,
1818
"pha": [False, False, False, True, True, True],
1919
"psm": 1,
20+
"pnp": 1,
2021
"tma": [12.25, 24.875],
2122
"dwo": None,
2223
"adi": True,
@@ -86,6 +87,7 @@
8687
"p_l3": 0.0,
8788
"p_n": 0.0,
8889
"phase_switch_mode": 1,
90+
"phases_number_connected": 1,
8991
"post_contactor_l1": True,
9092
"post_contactor_l2": True,
9193
"post_contactor_l3": True,

0 commit comments

Comments
 (0)