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 +14 -3
- {emerald_hws-0.0.22.dist-info → emerald_hws-0.0.23.dist-info}/METADATA +1 -1
- emerald_hws-0.0.23.dist-info/RECORD +7 -0
- emerald_hws-0.0.22.dist-info/RECORD +0 -7
- {emerald_hws-0.0.22.dist-info → emerald_hws-0.0.23.dist-info}/WHEEL +0 -0
- {emerald_hws-0.0.22.dist-info → emerald_hws-0.0.23.dist-info}/top_level.txt +0 -0
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
|
-
|
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 =
|
126
|
+
self.properties = combined_properties
|
116
127
|
|
117
128
|
# Check if we got valid data
|
118
|
-
if
|
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")
|
@@ -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,,
|
File without changes
|
File without changes
|