diff --git a/solax/utils.py b/solax/utils.py index f2a884f..fcabfb1 100644 --- a/solax/utils.py +++ b/solax/utils.py @@ -10,7 +10,8 @@ class Packer(Protocol): # pragma: no cover data into one raw value """ - def __call__(self, *vals: float) -> float: ... + def __call__(self, *vals: float) -> float: + ... PackerBuilderResult = Tuple[Tuple[int, ...], Packer] @@ -23,7 +24,8 @@ class PackerBuilder(Protocol): # pragma: no cover raw values to be fed to the packer """ - def __call__(self, *indexes: int) -> PackerBuilderResult: ... + def __call__(self, *indexes: int) -> PackerBuilderResult: + ... def __u16_packer(*values: float) -> float: diff --git a/tests/samples/expected_values.py b/tests/samples/expected_values.py index 35f3ef9..905b215 100644 --- a/tests/samples/expected_values.py +++ b/tests/samples/expected_values.py @@ -405,42 +405,42 @@ } X1_BOOST_VALUES = { - "AC Voltage": 239.6, - "AC Output Current": 12.6, - "AC Output Power": 2956, - "PV1 Voltage": 432.9, - "PV2 Voltage": 233.8, - "PV1 Current": 4.1, - "PV2 Current": 5.7, - "PV1 Power": 1777, - "PV2 Power": 1336, - "AC Frequency": 60.21, - "Total Generated Energy": 121.5, - "Today's Generated Energy": 13.7, - "Inverter Temperature": 43, - "Exported Power": 10, - "Total Export Energy": 0.87, - "Total Import Energy": 81.84, - } + "AC Voltage": 239.6, + "AC Output Current": 12.6, + "AC Output Power": 2956, + "PV1 Voltage": 432.9, + "PV2 Voltage": 233.8, + "PV1 Current": 4.1, + "PV2 Current": 5.7, + "PV1 Power": 1777, + "PV2 Power": 1336, + "AC Frequency": 60.21, + "Total Generated Energy": 121.5, + "Today's Generated Energy": 13.7, + "Inverter Temperature": 43, + "Exported Power": 10, + "Total Export Energy": 0.87, + "Total Import Energy": 81.84, +} X1_BOOST_VALUES_OVERFLOWN = { - "AC Voltage": 237.4, - "AC Output Current": 6.7, - "AC Output Power": 1581, - "PV1 Voltage": 397.3, - "PV2 Voltage": 233.8, - "PV1 Current": 4.1, - "PV2 Current": 5.7, - "PV1 Power": 1628, - "PV2 Power": 1336, - "AC Frequency": 49.96, - "Total Generated Energy": 14055.6, - "Today's Generated Energy": 1.3, - "Inverter Temperature": 36, - "Exported Power": 1444, - "Total Export Energy": 11348.18, - "Total Import Energy": 1850.05, - } + "AC Voltage": 237.4, + "AC Output Current": 6.7, + "AC Output Power": 1581, + "PV1 Voltage": 397.3, + "PV2 Voltage": 233.8, + "PV1 Current": 4.1, + "PV2 Current": 5.7, + "PV1 Power": 1628, + "PV2 Power": 1336, + "AC Frequency": 49.96, + "Total Generated Energy": 14055.6, + "Today's Generated Energy": 1.3, + "Inverter Temperature": 36, + "Exported Power": 1444, + "Total Export Energy": 11348.18, + "Total Import Energy": 1850.05, +} QVOLTHYBG33P_VALUES = { "Network Voltage Phase 1": 221.4, diff --git a/tests/samples/responses.py b/tests/samples/responses.py index ec67c12..64304a9 100644 --- a/tests/samples/responses.py +++ b/tests/samples/responses.py @@ -763,26 +763,24 @@ "sn": "XXXXXXX", "ver": "2.034.06", "type": 4, - "Data": [ - 2396, - 126, - 2956, - 4329, - 2338, - 41, - 57, - 1777, - 1336, - 6021, - 2, - 1215, - 0, - 137, - 0, - 0, - 0, - 0, - 0, + "Data": [ + 2396, + 126, + 2956, + 4329, + 2338, + 41, + 57, + 1777, + 1336, + 6021, + 2, + 1215, + 0, + 137, + 0, + 0, + 0, 0, 0, 0, @@ -800,42 +798,25 @@ 0, 0, 0, - 0, - 0, - 0, - 43, - 0, - 80, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 65535, - 87, - 0, - 8184, - 0, - 0, - 0, - 0, - 0, - 0, 0, 0, 0, 0, 0, + 43, 0, + 80, 0, 0, 0, 0, 0, 0, + 10, + 65535, + 87, 0, + 8184, 0, 0, 0, @@ -962,11 +943,30 @@ 0, 0, 0, - 0, - 0, - ], - "Information": [5.0, 4, "XXXXXXX", 1, 2.21, 0.00, 1.38, 0.00, 0.00, 1], - } + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + ], + "Information": [5.0, 4, "XXXXXXX", 1, 2.21, 0.00, 1.38, 0.00, 0.00, 1], +} X1_BOOST_RESPONSE_OVERFLOWN = { "sn": "XXXXXXX",