From c8b756aff7adf136380903a5b510fa4fd72cd7e4 Mon Sep 17 00:00:00 2001 From: Marc Luehr Date: Tue, 9 Apr 2024 09:38:35 +0200 Subject: [PATCH] fix: Remove run mode number HA uses the field index as ids for the sensors, hence it must not occur twice. --- solax/inverters/x3_hybrid_g4.py | 2 +- tests/samples/expected_values.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/solax/inverters/x3_hybrid_g4.py b/solax/inverters/x3_hybrid_g4.py index 34048da..98a76b9 100644 --- a/solax/inverters/x3_hybrid_g4.py +++ b/solax/inverters/x3_hybrid_g4.py @@ -85,7 +85,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), diff --git a/tests/samples/expected_values.py b/tests/samples/expected_values.py index 4af3422..a314da8 100644 --- a/tests/samples/expected_values.py +++ b/tests/samples/expected_values.py @@ -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,