Skip to content

Commit

Permalink
formating
Browse files Browse the repository at this point in the history
  • Loading branch information
kalosisz committed Feb 10, 2024
1 parent 93a57bb commit fcac904
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 84 deletions.
6 changes: 4 additions & 2 deletions solax/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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:
Expand Down
68 changes: 34 additions & 34 deletions tests/samples/expected_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
96 changes: 48 additions & 48 deletions tests/samples/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit fcac904

Please sign in to comment.