aioamazondevices 6.4.0__tar.gz → 6.4.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.
Potentially problematic release.
This version of aioamazondevices might be problematic. Click here for more details.
- {aioamazondevices-6.4.0 → aioamazondevices-6.4.1}/PKG-INFO +2 -3
- {aioamazondevices-6.4.0 → aioamazondevices-6.4.1}/pyproject.toml +2 -4
- {aioamazondevices-6.4.0 → aioamazondevices-6.4.1}/src/aioamazondevices/__init__.py +1 -1
- {aioamazondevices-6.4.0 → aioamazondevices-6.4.1}/src/aioamazondevices/api.py +14 -8
- {aioamazondevices-6.4.0 → aioamazondevices-6.4.1}/LICENSE +0 -0
- {aioamazondevices-6.4.0 → aioamazondevices-6.4.1}/README.md +0 -0
- {aioamazondevices-6.4.0 → aioamazondevices-6.4.1}/src/aioamazondevices/const.py +0 -0
- {aioamazondevices-6.4.0 → aioamazondevices-6.4.1}/src/aioamazondevices/exceptions.py +0 -0
- {aioamazondevices-6.4.0 → aioamazondevices-6.4.1}/src/aioamazondevices/py.typed +0 -0
- {aioamazondevices-6.4.0 → aioamazondevices-6.4.1}/src/aioamazondevices/query.py +0 -0
- {aioamazondevices-6.4.0 → aioamazondevices-6.4.1}/src/aioamazondevices/sounds.py +0 -0
- {aioamazondevices-6.4.0 → aioamazondevices-6.4.1}/src/aioamazondevices/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aioamazondevices
|
|
3
|
-
Version: 6.4.
|
|
3
|
+
Version: 6.4.1
|
|
4
4
|
Summary: Python library to control Amazon devices
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -16,8 +16,7 @@ Requires-Dist: aiohttp (>=3.12.7)
|
|
|
16
16
|
Requires-Dist: beautifulsoup4
|
|
17
17
|
Requires-Dist: colorlog
|
|
18
18
|
Requires-Dist: langcodes
|
|
19
|
-
Requires-Dist: orjson
|
|
20
|
-
Requires-Dist: yarl
|
|
19
|
+
Requires-Dist: orjson (>=3.10,<4)
|
|
21
20
|
Project-URL: Bug Tracker, https://github.com/chemelli74/aioamazondevices/issues
|
|
22
21
|
Project-URL: Changelog, https://github.com/chemelli74/aioamazondevices/blob/main/CHANGELOG.md
|
|
23
22
|
Project-URL: Homepage, https://github.com/chemelli74/aioamazondevices
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "aioamazondevices"
|
|
3
|
-
version = "6.4.
|
|
3
|
+
version = "6.4.1"
|
|
4
4
|
requires-python = ">=3.12"
|
|
5
5
|
description = "Python library to control Amazon devices"
|
|
6
6
|
authors = [
|
|
@@ -24,8 +24,7 @@ dependencies = [
|
|
|
24
24
|
"beautifulsoup4",
|
|
25
25
|
"colorlog",
|
|
26
26
|
"langcodes",
|
|
27
|
-
"orjson",
|
|
28
|
-
"yarl",
|
|
27
|
+
"orjson (>=3.10,<4)",
|
|
29
28
|
]
|
|
30
29
|
|
|
31
30
|
[project.urls]
|
|
@@ -33,7 +32,6 @@ dependencies = [
|
|
|
33
32
|
"Bug Tracker" = "https://github.com/chemelli74/aioamazondevices/issues"
|
|
34
33
|
"Changelog" = "https://github.com/chemelli74/aioamazondevices/blob/main/CHANGELOG.md"
|
|
35
34
|
|
|
36
|
-
|
|
37
35
|
[tool.poetry.group.dev.dependencies]
|
|
38
36
|
pytest = "^8.4"
|
|
39
37
|
pytest-cov = ">=5,<8"
|
|
@@ -747,7 +747,6 @@ class AmazonEchoApi:
|
|
|
747
747
|
devices_endpoints[serial_number] = endpoint
|
|
748
748
|
self._endpoints[endpoint["endpointId"]] = serial_number
|
|
749
749
|
|
|
750
|
-
self._last_endpoint_refresh = datetime.now(UTC)
|
|
751
750
|
return devices_endpoints
|
|
752
751
|
|
|
753
752
|
async def _response_to_json(self, raw_resp: ClientResponse) -> dict[str, Any]:
|
|
@@ -926,17 +925,25 @@ class AmazonEchoApi:
|
|
|
926
925
|
self,
|
|
927
926
|
) -> dict[str, AmazonDevice]:
|
|
928
927
|
"""Get Amazon devices data."""
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
928
|
+
delta_devices = datetime.now(UTC) - self._last_devices_refresh
|
|
929
|
+
if delta_devices >= timedelta(days=1):
|
|
930
|
+
_LOGGER.debug(
|
|
931
|
+
"Refreshing devices data after %s",
|
|
932
|
+
str(timedelta(minutes=round(delta_devices.total_seconds() / 60))),
|
|
933
|
+
)
|
|
932
934
|
# Request base device data
|
|
933
935
|
await self._get_base_devices()
|
|
936
|
+
self._last_devices_refresh = datetime.now(UTC)
|
|
934
937
|
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
+
delta_endpoints = datetime.now(UTC) - self._last_endpoint_refresh
|
|
939
|
+
if delta_endpoints >= timedelta(minutes=30):
|
|
940
|
+
_LOGGER.debug(
|
|
941
|
+
"Refreshing endpoint data after %s",
|
|
942
|
+
str(timedelta(minutes=round(delta_endpoints.total_seconds() / 60))),
|
|
943
|
+
)
|
|
938
944
|
# Set device endpoint data
|
|
939
945
|
await self._set_device_endpoints_data()
|
|
946
|
+
self._last_endpoint_refresh = datetime.now(UTC)
|
|
940
947
|
|
|
941
948
|
await self._get_sensor_data()
|
|
942
949
|
|
|
@@ -1028,7 +1035,6 @@ class AmazonEchoApi:
|
|
|
1028
1035
|
)
|
|
1029
1036
|
|
|
1030
1037
|
self._final_devices = final_devices_list
|
|
1031
|
-
self._last_devices_refresh = datetime.now(UTC)
|
|
1032
1038
|
|
|
1033
1039
|
async def auth_check_status(self) -> bool:
|
|
1034
1040
|
"""Check AUTH status."""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|