From 145dbe1782ee5ea4ed1ea9973f93be9848724b20 Mon Sep 17 00:00:00 2001 From: Th3Link Date: Wed, 5 Jun 2024 13:05:09 +0200 Subject: [PATCH] fix: Remove run mode number (#149) HA uses the field index as ids for the sensors, hence it must not occur twice. Co-authored-by: Marc Luehr --- 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 2665060..d4a15b3 100644 --- a/solax/inverters/x3_hybrid_g4.py +++ b/solax/inverters/x3_hybrid_g4.py @@ -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), diff --git a/tests/samples/expected_values.py b/tests/samples/expected_values.py index d57f613..bccbaf4 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,