pyhive-integration 1.0.8.dev2__tar.gz → 1.0.8.dev3__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.
- {pyhive_integration-1.0.8.dev2/pyhive_integration.egg-info → pyhive_integration-1.0.8.dev3}/PKG-INFO +1 -1
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3/pyhive_integration.egg-info}/PKG-INFO +1 -1
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/setup.py +1 -1
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/session.py +11 -2
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/LICENSE +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/MANIFEST.in +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/README.md +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/pyhive_integration.egg-info/SOURCES.txt +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/pyhive_integration.egg-info/dependency_links.txt +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/pyhive_integration.egg-info/requires.txt +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/pyhive_integration.egg-info/top_level.txt +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/pyproject.toml +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/requirements.txt +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/requirements_test.txt +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/setup.cfg +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/__init__.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/action.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/alarm.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/api/__init__.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/api/hive_api.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/api/hive_async_api.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/api/hive_auth.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/api/hive_auth_async.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/camera.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/device_attributes.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/heating.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/helper/__init__.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/helper/const.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/helper/debugger.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/helper/hive_exceptions.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/helper/hive_helper.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/helper/hivedataclasses.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/helper/map.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/hive.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/hotwater.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/hub.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/light.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/plug.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/sensor.py +0 -0
- {pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/tests/test_hub.py +0 -0
|
@@ -17,7 +17,7 @@ def requirements_from_file(filename="requirements.txt"):
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
setup(
|
|
20
|
-
version="1.0.8.
|
|
20
|
+
version="1.0.8.dev3",
|
|
21
21
|
packages=["apyhiveapi", "apyhiveapi.api", "apyhiveapi.helper"],
|
|
22
22
|
package_dir={"apyhiveapi": "src"},
|
|
23
23
|
package_data={"data": ["*.json"]},
|
|
@@ -357,6 +357,11 @@ class HiveSession:
|
|
|
357
357
|
else:
|
|
358
358
|
expiry_time = self.tokens.tokenCreated + (self.tokens.tokenExpiry * 0.95)
|
|
359
359
|
# Refresh at 95% of token lifetime to prevent expiration during API calls
|
|
360
|
+
_LOGGER.debug(
|
|
361
|
+
"Checking token expiry time ( Current: %s | Expiry: %s)",
|
|
362
|
+
datetime.now(),
|
|
363
|
+
expiry_time,
|
|
364
|
+
)
|
|
360
365
|
if datetime.now() >= expiry_time:
|
|
361
366
|
async with self._refreshLock:
|
|
362
367
|
# Re-check after acquiring lock — another caller may have already refreshed
|
|
@@ -365,10 +370,14 @@ class HiveSession:
|
|
|
365
370
|
)
|
|
366
371
|
if datetime.now() < expiry_time:
|
|
367
372
|
return result
|
|
373
|
+
actual_expiry = self.tokens.tokenCreated + self.tokens.tokenExpiry
|
|
368
374
|
_LOGGER.debug(
|
|
369
|
-
"Token
|
|
375
|
+
"Token created: %s | Actual expiry: %s | "
|
|
376
|
+
"Early refresh (×0.95): %s | Now: %s",
|
|
370
377
|
self.tokens.tokenCreated,
|
|
371
|
-
|
|
378
|
+
actual_expiry,
|
|
379
|
+
expiry_time,
|
|
380
|
+
datetime.now(),
|
|
372
381
|
)
|
|
373
382
|
try:
|
|
374
383
|
result = await self.auth.refresh_token(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/helper/hive_exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyhive_integration-1.0.8.dev2 → pyhive_integration-1.0.8.dev3}/src/helper/hivedataclasses.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|