aioamazondevices 2.0.0__tar.gz → 2.1.0__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.
- {aioamazondevices-2.0.0 → aioamazondevices-2.1.0}/PKG-INFO +13 -1
- {aioamazondevices-2.0.0 → aioamazondevices-2.1.0}/README.md +12 -0
- {aioamazondevices-2.0.0 → aioamazondevices-2.1.0}/pyproject.toml +1 -1
- {aioamazondevices-2.0.0 → aioamazondevices-2.1.0}/src/aioamazondevices/__init__.py +1 -1
- {aioamazondevices-2.0.0 → aioamazondevices-2.1.0}/src/aioamazondevices/api.py +17 -0
- {aioamazondevices-2.0.0 → aioamazondevices-2.1.0}/src/aioamazondevices/const.py +3 -3
- {aioamazondevices-2.0.0 → aioamazondevices-2.1.0}/LICENSE +0 -0
- {aioamazondevices-2.0.0 → aioamazondevices-2.1.0}/src/aioamazondevices/exceptions.py +0 -0
- {aioamazondevices-2.0.0 → aioamazondevices-2.1.0}/src/aioamazondevices/httpx.py +0 -0
- {aioamazondevices-2.0.0 → aioamazondevices-2.1.0}/src/aioamazondevices/py.typed +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: aioamazondevices
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.1.0
|
4
4
|
Summary: Python library to control Amazon devices
|
5
5
|
License: Apache-2.0
|
6
6
|
Author: Simone Chemelli
|
@@ -90,6 +90,18 @@ The script accept command line arguments or a library_test.json config file:
|
|
90
90
|
}
|
91
91
|
```
|
92
92
|
|
93
|
+
## Unknown device type
|
94
|
+
|
95
|
+
Library logs a warning if an unknown device type is linked to your Amazon account.
|
96
|
+
|
97
|
+
Please open an issue [here](https://github.com/chemelli74/aioamazondevices/issues) and provide the following information:
|
98
|
+
|
99
|
+
- device type
|
100
|
+
- model
|
101
|
+
- generation
|
102
|
+
|
103
|
+
Current device list: `DEVICE_TYPE_TO_MODEL` from [const.py](https://github.com/chemelli74/aioamazondevices/blob/main/src/aioamazondevices/const.py)
|
104
|
+
|
93
105
|
## Contributors ✨
|
94
106
|
|
95
107
|
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
@@ -61,6 +61,18 @@ The script accept command line arguments or a library_test.json config file:
|
|
61
61
|
}
|
62
62
|
```
|
63
63
|
|
64
|
+
## Unknown device type
|
65
|
+
|
66
|
+
Library logs a warning if an unknown device type is linked to your Amazon account.
|
67
|
+
|
68
|
+
Please open an issue [here](https://github.com/chemelli74/aioamazondevices/issues) and provide the following information:
|
69
|
+
|
70
|
+
- device type
|
71
|
+
- model
|
72
|
+
- generation
|
73
|
+
|
74
|
+
Current device list: `DEVICE_TYPE_TO_MODEL` from [const.py](https://github.com/chemelli74/aioamazondevices/blob/main/src/aioamazondevices/const.py)
|
75
|
+
|
64
76
|
## Contributors ✨
|
65
77
|
|
66
78
|
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
@@ -33,6 +33,7 @@ from .const import (
|
|
33
33
|
CSRF_COOKIE,
|
34
34
|
DEFAULT_ASSOC_HANDLE,
|
35
35
|
DEFAULT_HEADERS,
|
36
|
+
DEVICE_TYPE_TO_MODEL,
|
36
37
|
DOMAIN_BY_ISO3166_COUNTRY,
|
37
38
|
HTML_EXTENSION,
|
38
39
|
JSON_EXTENSION,
|
@@ -629,6 +630,22 @@ class AmazonEchoApi:
|
|
629
630
|
_LOGGER.debug("Session authenticated: %s", authenticated)
|
630
631
|
return bool(authenticated)
|
631
632
|
|
633
|
+
async def get_model_details(
|
634
|
+
self, device: AmazonDevice
|
635
|
+
) -> dict[str, str | None] | None:
|
636
|
+
"""Return model datails."""
|
637
|
+
model_details: dict[str, str | None] | None = DEVICE_TYPE_TO_MODEL.get(
|
638
|
+
device.device_type
|
639
|
+
)
|
640
|
+
if not model_details:
|
641
|
+
_LOGGER.warning(
|
642
|
+
"Unknown device type '%s' for %s: please read https://github.com/chemelli74/aioamazondevices?tab=readme-ov-file#unknon-device-type",
|
643
|
+
device.device_type,
|
644
|
+
device.account_name,
|
645
|
+
)
|
646
|
+
|
647
|
+
return model_details
|
648
|
+
|
632
649
|
async def _send_message(
|
633
650
|
self,
|
634
651
|
device: AmazonDevice,
|
@@ -63,9 +63,9 @@ HTML_EXTENSION = ".html"
|
|
63
63
|
JSON_EXTENSION = ".json"
|
64
64
|
BIN_EXTENSION = ".bin"
|
65
65
|
|
66
|
-
|
66
|
+
SPEAKER_GROUP_MODEL = "Speaker Group"
|
67
67
|
|
68
|
-
DEVICE_TYPE_TO_MODEL = {
|
68
|
+
DEVICE_TYPE_TO_MODEL: dict[str, dict[str, str | None]] = {
|
69
69
|
"A1RABVCI4QCIKC": {
|
70
70
|
"model": "Echo Dot",
|
71
71
|
"hw_version": "Gen3",
|
@@ -107,7 +107,7 @@ DEVICE_TYPE_TO_MODEL = {
|
|
107
107
|
"hw_version": "Gen1",
|
108
108
|
},
|
109
109
|
"A3C9PE6TNYLTCH": {
|
110
|
-
"model":
|
110
|
+
"model": SPEAKER_GROUP_MODEL,
|
111
111
|
"hw_version": None,
|
112
112
|
},
|
113
113
|
"A1Q6UGEXJZWJQ0": {
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|