python-hotspring 2.0.0__tar.gz → 2.0.1__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: python-hotspring
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Summary: Asynchronous Python client for Hot Spring Connected Spa Kit 2.
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -22,7 +22,7 @@ packages = [
22
22
  ]
23
23
  readme = "README.md"
24
24
  repository = "https://github.com/Moustachauve/python-hotspring"
25
- version = "2.0.0"
25
+ version = "2.0.1"
26
26
 
27
27
  [tool.poetry.dependencies]
28
28
  aiohttp = ">=3.0.0"
@@ -166,8 +166,9 @@ class HotSpring:
166
166
  the main /status endpoint concurrently with /startup, /spaConnectStatus,
167
167
  and /spamodel.
168
168
 
169
- On subsequent routine polling cycles, it only queries the fast /status
170
- endpoint, avoiding redundant radio (LoRA) queries for static identity data.
169
+ On subsequent routine polling cycles, it queries /status and /spaConnectStatus
170
+ concurrently, avoiding redundant radio (LoRA) queries for static identity data
171
+ while keeping telemetry and connection status fresh.
171
172
 
172
173
  Args:
173
174
  ----
@@ -208,12 +209,18 @@ class HotSpring:
208
209
  self._identity_loaded = True
209
210
  return self.spa
210
211
 
211
- status_data = await self.request("/status")
212
+ status_res, connect_res = await asyncio.gather(
213
+ self.request("/status"),
214
+ self._safe_request("/spaConnectStatus"),
215
+ )
212
216
 
213
217
  if self.spa is None: # Safety guard; spa is always set after cold sync
214
- self.spa = Spa(status_data)
218
+ self.spa = Spa(status_res)
215
219
  else:
216
- self.spa.update_from_dict(status_data)
220
+ self.spa.update_from_dict(status_res)
221
+
222
+ if connect_res:
223
+ self.spa.update_connection_status(connect_res)
217
224
 
218
225
  return self.spa
219
226