emerald-hws 0.0.22__py3-none-any.whl → 0.0.23__py3-none-any.whl

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.
emerald_hws/emeraldhws.py CHANGED
@@ -109,13 +109,24 @@ class EmeraldHWS():
109
109
 
110
110
  if post_response_json.get("code") == 200:
111
111
  self.logger.debug("emeraldhws: Successfully logged into Emerald API")
112
- property_data = post_response_json.get("info", {}).get("property")
112
+ info = post_response_json.get("info", {})
113
+
114
+ # Retrieve both property and shared_property arrays
115
+ property_data = info.get("property", [])
116
+ shared_property_data = info.get("shared_property", [])
117
+
118
+ # Combine both arrays into a single list
119
+ combined_properties = []
120
+ if isinstance(property_data, list):
121
+ combined_properties.extend(property_data)
122
+ if isinstance(shared_property_data, list):
123
+ combined_properties.extend(shared_property_data)
113
124
 
114
125
  with self._state_lock:
115
- self.properties = property_data
126
+ self.properties = combined_properties
116
127
 
117
128
  # Check if we got valid data
118
- if not isinstance(property_data, list) or len(property_data) == 0:
129
+ if len(combined_properties) == 0:
119
130
  # Log the full response when properties are invalid to help diagnose the issue
120
131
  self.logger.debug(f"emeraldhws: Poperties empty/invalid, full response: {post_response_json}")
121
132
  raise Exception("No heat pumps found on account - API returned empty or invalid property list")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: emerald_hws
3
- Version: 0.0.22
3
+ Version: 0.0.23
4
4
  Summary: A package to manipulate and monitor Emerald Heat Pump Hot Water Systems
5
5
  Author-email: Ross Williamson <ross@inertia.net.nz>
6
6
  License-Expression: MIT
@@ -0,0 +1,7 @@
1
+ emerald_hws/__init__.py,sha256=uukjQ-kiPYKWvGT3jLL6kJA1DCNAxtw4HlLKqPSypXs,61
2
+ emerald_hws/emeraldhws.py,sha256=_g8nIqNZxaZvM9ofLiRJsU4mJQ9Z2-Dw63sRFCwnXPA,29386
3
+ emerald_hws/__assets__/SFSRootCAG2.pem,sha256=hw9W0AnYrrlbcWsOewAgIl1ULEsoO57Ylu35dCjWcS4,1424
4
+ emerald_hws-0.0.23.dist-info/METADATA,sha256=cDH3P_sN-EPP5nQIwiviHPJNqynWHppoJ6w4sTt5bbQ,2534
5
+ emerald_hws-0.0.23.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
+ emerald_hws-0.0.23.dist-info/top_level.txt,sha256=ZCiUmnBkDr2n4QVkTet1s_AKiGJjuz3heuCR5w5ZqLY,12
7
+ emerald_hws-0.0.23.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- emerald_hws/__init__.py,sha256=uukjQ-kiPYKWvGT3jLL6kJA1DCNAxtw4HlLKqPSypXs,61
2
- emerald_hws/emeraldhws.py,sha256=DI3yaAoL_iNRqM480AuSKwVKa_nfbsvEVMdnrlW7OIA,28936
3
- emerald_hws/__assets__/SFSRootCAG2.pem,sha256=hw9W0AnYrrlbcWsOewAgIl1ULEsoO57Ylu35dCjWcS4,1424
4
- emerald_hws-0.0.22.dist-info/METADATA,sha256=aOWR41PKiop_mbtnkokueGiQuw46tFUB7nm84wnxvZk,2534
5
- emerald_hws-0.0.22.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
- emerald_hws-0.0.22.dist-info/top_level.txt,sha256=ZCiUmnBkDr2n4QVkTet1s_AKiGJjuz3heuCR5w5ZqLY,12
7
- emerald_hws-0.0.22.dist-info/RECORD,,