solarlog-cli 0.1.4__tar.gz → 0.1.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: solarlog_cli
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: Python library to access the Solar-Log
5
5
  Project-URL: Repository, https://github.com/dontinelli/solarlog_cli.git
6
6
  Project-URL: Issues, https://github.com/dontinelli/solarlog_cli/issues
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "solarlog_cli"
3
- version = "0.1.4"
3
+ version = "0.1.5"
4
4
  authors = [
5
5
  { name="dontinelli", email="73341522+dontinelli@users.noreply.github.com" },
6
6
  ]
@@ -50,6 +50,7 @@ class SolarLogConnector:
50
50
  # print(f"extended data updated: {data}")
51
51
 
52
52
  #calculated values (for downward compatibility)
53
+ data |= {"alternator_loss": data.get("power_dc") - data.get("power_ac")}
53
54
  if data.get("power_dc") != 0:
54
55
  data |= {"efficiency": data.get("power_ac") / data.get("power_dc")}
55
56
  if data.get("power_ac") != 0:
@@ -58,10 +59,8 @@ class SolarLogConnector:
58
59
  else:
59
60
  data |= {"usage": 0.0}
60
61
  data |= {"power_available": 0.0}
61
- data |= {"alternator_loss": data.get("power_dc") - data.get("power_ac")}
62
-
63
62
  if data.get("total_power") != 0:
64
- data |= {"capacity": - data.get("power_dc") / data.get("total_power")}
63
+ data |= {"capacity": data.get("power_dc") / data.get("total_power")}
65
64
 
66
65
  return data
67
66
 
File without changes
File without changes
File without changes