Homevolt 0.4.2__tar.gz → 0.4.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.4
2
2
  Name: Homevolt
3
- Version: 0.4.2
3
+ Version: 0.4.4
4
4
  Summary: Python library for Homevolt EMS devices
5
5
  Author-email: Daniel Høyer <github@dahoiv.net>
6
6
  License: GPL-3.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Homevolt
3
- Version: 0.4.2
3
+ Version: 0.4.4
4
4
  Summary: Python library for Homevolt EMS devices
5
5
  Author-email: Daniel Høyer <github@dahoiv.net>
6
6
  License: GPL-3.0
@@ -89,6 +89,10 @@ class Homevolt:
89
89
  raise HomevoltAuthenticationError("Authentication failed")
90
90
  response.raise_for_status()
91
91
  ems_data = await response.json()
92
+ except HomevoltAuthenticationError:
93
+ raise
94
+ except HomevoltConnectionError:
95
+ raise
92
96
  except aiohttp.ClientError as err:
93
97
  raise HomevoltConnectionError(f"Failed to connect to device: {err}") from err
94
98
  except Exception as err:
@@ -107,6 +111,10 @@ class Homevolt:
107
111
  raise HomevoltAuthenticationError("Authentication failed")
108
112
  response.raise_for_status()
109
113
  schedule_data = await response.json()
114
+ except HomevoltAuthenticationError:
115
+ raise
116
+ except HomevoltConnectionError:
117
+ raise
110
118
  except aiohttp.ClientError as err:
111
119
  raise HomevoltConnectionError(f"Failed to connect to device: {err}") from err
112
120
  except Exception as err:
@@ -183,14 +191,14 @@ class Homevolt:
183
191
  type="system_temperature",
184
192
  device_identifier=ems_device_id,
185
193
  ),
186
- "Imported Energy": Sensor(
194
+ "Energy imported": Sensor(
187
195
  value=ems["ems_aggregate"]["imported_kwh"],
188
- type="imported_energy",
196
+ type="energy_imported",
189
197
  device_identifier=ems_device_id,
190
198
  ),
191
- "Exported Energy": Sensor(
199
+ "Energy exported": Sensor(
192
200
  value=ems["ems_aggregate"]["exported_kwh"],
193
- type="exported_energy",
201
+ type="energy_exported",
194
202
  device_identifier=ems_device_id,
195
203
  ),
196
204
  "Available Charging Power": Sensor(
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "Homevolt"
7
- version = "0.4.2"
7
+ version = "0.4.4"
8
8
  description = "Python library for Homevolt EMS devices"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes