solarlog-cli 0.1.1__tar.gz → 0.1.2__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.1
3
+ Version: 0.1.2
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.1"
3
+ version = "0.1.2"
4
4
  authors = [
5
5
  { name="dontinelli", email="73341522+dontinelli@users.noreply.github.com" },
6
6
  ]
@@ -45,7 +45,8 @@ class SolarLogConnector:
45
45
  # print(f"basic data updated: {data}")
46
46
  if self.extended_data:
47
47
  data |= await self.client.get_energy()
48
- data |= {"devices": await self.update_inverter_data()}
48
+ if self._device_enabled is not {}:
49
+ data |= {"devices": await self.update_inverter_data()}
49
50
  # print(f"extended data updated: {data}")
50
51
 
51
52
  #calculated values (for downward compatibility)
@@ -86,7 +87,7 @@ class SolarLogConnector:
86
87
  # print(f"power: {raw_data}")
87
88
  for key, value in raw_data.items():
88
89
  key = int(key)
89
- if self._device_enabled[key]:
90
+ if self._device_enabled.get(key, False):
90
91
  data |= {key: {"current_power": float(value)}}
91
92
 
92
93
  raw_data = await self.client.get_energy_per_inverter()
File without changes
File without changes
File without changes