Skip to content

Commit

Permalink
update example.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bbr111 committed Nov 10, 2024
1 parent 67ee0ea commit 494947c
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,30 @@ async def main():
print(f"ETA: {data['eta']}")
print(f"Battery Type: {data['battery_type']}")
print(f"Inverter Type: {data['inverter_type']}")
print("\nTower Attributes:")
for idx, tower in enumerate(data['tower_attributes']):
print(f"\nTower {idx + 1}:")
print(f" Max Cell Voltage (mV): {tower.get('maxCellVoltage_mV')}")
print(f" Min Cell Voltage (mV): {tower.get('minCellVoltage_mV')}")
print(f" Max Cell Voltage Cell: {tower.get('maxCellVoltageCell')}")
print(f" Min Cell Voltage Cell: {tower.get('minCellVoltageCell')}")
print(f" Max Cell Temp Cell: {tower.get('maxCellTempCell')}")
print(f" Min Cell Temp Cell: {tower.get('minCellTempCell')}")
print(f" Max Cell Voltage Cell: No. {tower.get('maxCellVoltageCell')}")
print(f" Min Cell Voltage Cell: No. {tower.get('minCellVoltageCell')}")
print(f" Max Cell Temp: {tower.get('maxCellTemp')}°C")
print(f" Min Cell Temp: {tower.get('minCellTemp')}°C")
print(f" Max Cell Temp Cell: No. {tower.get('maxCellTempCell')}")
print(f" Min Cell Temp Cell: No. {tower.get('minCellTempCell')}")
print(f" Balancing Status: {tower.get('balancingStatus')}")
print(f" Balancing Count: {tower.get('balancingCount')}")
print(f" Total Charge: {tower['chargeTotal']}")
print(f" Discharge Total: {tower.get('dischargeTotal')}")
print(f" ETA: {tower.get('eta')}")
print(f" Battery Volt: {tower.get('batteryVolt')}")
print(f" Output Volt: {tower.get('outVolt')}")
print(f" SOCDiagnosis: {tower.get('hvsSOCDiagnosis')}%")
print(f" State of Health: {tower.get('soh')}%")
print(f" State: {tower.get('state')}")
print(f" Cell Voltages: {tower.get('cellVoltages')}")
print(f" Cell Temperatures: {tower.get('cellTemperatures')}")


except Exception as e:
print(f"An error occurred: {e}")

Expand Down

0 comments on commit 494947c

Please sign in to comment.