solarlog-cli 0.1.2__tar.gz → 0.1.4__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.2
3
+ Version: 0.1.4
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.2"
3
+ version = "0.1.4"
4
4
  authors = [
5
5
  { name="dontinelli", email="73341522+dontinelli@users.noreply.github.com" },
6
6
  ]
@@ -64,6 +64,7 @@ class Client:
64
64
  content_type = response.headers.get("Content-Type", "")
65
65
 
66
66
  if response.status != 200:
67
+ # pylint: disable-next=line-too-long
67
68
  msg = f"The server responded with error code {response.status} while fetching data from Solar-Log at {self.host}.\n{url}\n{header}\n{json_payload}"
68
69
  text = await response.text()
69
70
  raise SolarLogUpdateError(
@@ -40,12 +40,12 @@ class SolarLogConnector:
40
40
  "Invalid data returned (can happen after Solarlog restart)."
41
41
  )
42
42
 
43
- data["last_updated"] = data["last_updated"].astimezone(self.timezone)
43
+ data["last_updated"] = data["last_updated"].replace(tzinfo=self.timezone)
44
44
 
45
45
  # print(f"basic data updated: {data}")
46
46
  if self.extended_data:
47
47
  data |= await self.client.get_energy()
48
- if self._device_enabled is not {}:
48
+ if self._device_enabled != {} and self._device_enabled is not None:
49
49
  data |= {"devices": await self.update_inverter_data()}
50
50
  # print(f"extended data updated: {data}")
51
51
 
File without changes
File without changes
File without changes