Skip to content

Commit

Permalink
fix: Remove run mode number (#149)
Browse files Browse the repository at this point in the history
HA uses the field index as ids for the sensors, hence it
must not occur twice.

Co-authored-by: Marc Luehr <[email protected]>
  • Loading branch information
Th3Link and Marc Luehr authored Jun 5, 2024
1 parent 827abcb commit 145dbe1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion solax/inverters/x3_hybrid_g4.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def response_decoder(cls):
"Grid 1 Frequency": (16, Units.HZ, div100),
"Grid 2 Frequency": (17, Units.HZ, div100),
"Grid 3 Frequency": (18, Units.HZ, div100),
"Run mode": (19, Units.NONE),
# "Run mode": (19, Units.NONE), # Only use the index once due to HA uids
"Run mode text": (19, Units.NONE, X3HybridG4._decode_run_mode),
"EPS 1 Voltage": (23, Units.V, div10),
"EPS 2 Voltage": (24, Units.V, div10),
Expand Down
1 change: 0 additions & 1 deletion tests/samples/expected_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@
"Grid 1 Frequency": 50.01,
"Grid 2 Frequency": 50.01,
"Grid 3 Frequency": 50.01,
"Run mode": 2.0,
"Run mode text": "Normal",
"EPS 1 Voltage": 0.0,
"EPS 2 Voltage": 0.0,
Expand Down

0 comments on commit 145dbe1

Please sign in to comment.