From 5825dbd7bf257079c1676950e05ee909dc0a85c7 Mon Sep 17 00:00:00 2001 From: Jakub Darmach Date: Sat, 23 Nov 2024 14:18:04 +0100 Subject: [PATCH] Added 'today' postfix to daily feed-in and consumed energy Breaking change: - added 'today' postfix to daily feed-in and consumed energy to adhere to the convention used for other sensors. Attempted to correct failing coverage. --- .github/workflows/tests.yaml | 1 + solax/inverters/x3_hybrid_g4.py | 4 ++-- tests/samples/expected_values.py | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d6583f5..858b6d7 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -46,6 +46,7 @@ jobs: name: .coverage-${{ matrix.python-version }} path: .coverage.${{ matrix.python-version }} if-no-files-found: error + include-hidden-files: true coverage: runs-on: ubuntu-latest diff --git a/solax/inverters/x3_hybrid_g4.py b/solax/inverters/x3_hybrid_g4.py index 6fcb6a1..89fa795 100644 --- a/solax/inverters/x3_hybrid_g4.py +++ b/solax/inverters/x3_hybrid_g4.py @@ -118,8 +118,8 @@ def response_decoder(cls): "PV Energy total": (pack_u16(80, 81), Total(Units.KWH), div10), "EPS Energy total": (pack_u16(83, 84), Total(Units.KWH), div10), "EPS Energy today": (85, DailyTotal(Units.KWH), div10), - "Feed-in Energy": (pack_u16(90, 91), DailyTotal(Units.KWH), div100), - "Consumed Energy": (pack_u16(92, 93), DailyTotal(Units.KWH), div100), + "Feed-in Energy today": (pack_u16(90, 91), DailyTotal(Units.KWH), div100), + "Consumed Energy today": (pack_u16(92, 93), DailyTotal(Units.KWH), div100), "Feed-in Energy total": (pack_u16(86, 87), Total(Units.KWH), div100), "Consumed Energy total": (pack_u16(88, 89), Total(Units.KWH), div100), "Battery Remaining Capacity": (103, Units.PERCENT), diff --git a/tests/samples/expected_values.py b/tests/samples/expected_values.py index 65d1f70..7f19963 100644 --- a/tests/samples/expected_values.py +++ b/tests/samples/expected_values.py @@ -299,8 +299,8 @@ "PV Energy total": 3.4, "EPS Energy total": 0.0, "EPS Energy today": 0.0, - "Feed-in Energy": 0.0, - "Consumed Energy": 2.09, + "Feed-in Energy today": 0.0, + "Consumed Energy today": 2.09, "Feed-in Energy total": 0.0, "Consumed Energy total": 20.09, "Battery Remaining Capacity": 30.0,