aioamazondevices 2.0.1__py3-none-any.whl → 2.1.0__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.
@@ -1,6 +1,6 @@
1
1
  """aioamazondevices library."""
2
2
 
3
- __version__ = "2.0.1"
3
+ __version__ = "2.1.0"
4
4
 
5
5
 
6
6
  from .api import AmazonDevice, AmazonEchoApi
aioamazondevices/api.py CHANGED
@@ -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,
aioamazondevices/const.py CHANGED
@@ -65,7 +65,7 @@ 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",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: aioamazondevices
3
- Version: 2.0.1
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)):
@@ -0,0 +1,10 @@
1
+ aioamazondevices/__init__.py,sha256=2l4-ydGXxEAeeFMOZhNjrZGf1cclng3YBKz7YAjgv_c,276
2
+ aioamazondevices/api.py,sha256=6G4KfbXxcnqEOU73f1U6zQwaaVw-6hqJAEUsdYsOB6c,29449
3
+ aioamazondevices/const.py,sha256=KYaCrvIemf_TzXxP4ZVi5ovlL7qFPWdF_W9vU1AiboE,2778
4
+ aioamazondevices/exceptions.py,sha256=qK_Hak9pc-lC2FPW-0i4rYIwNpEOHMmA9Rii8F2lkQo,1260
5
+ aioamazondevices/httpx.py,sha256=DyuD2HD3GGGbBq65qcjPCCxeuSkALKzDAdrUSeZcRMM,4935
6
+ aioamazondevices/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ aioamazondevices-2.1.0.dist-info/LICENSE,sha256=sS48k5sp9bFV-NSHDfAJuTZZ_-AP9ZDqUzQ9sffGlsg,11346
8
+ aioamazondevices-2.1.0.dist-info/METADATA,sha256=8ofLplqrYZ5QrPpFKDQR66SAB29bnh4OpC6RAjy6Jr4,5447
9
+ aioamazondevices-2.1.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
10
+ aioamazondevices-2.1.0.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- aioamazondevices/__init__.py,sha256=TU5pkDrj-IROyS3bXQhMNopPkhKhlaRoRZkzHkuCcGc,276
2
- aioamazondevices/api.py,sha256=K6Qbqy3QNrZhh-ez2wkYwtiz-vfE2vwJQKKXeZyFe8Y,28833
3
- aioamazondevices/const.py,sha256=QHjcNThWQpEq2SkDUT34LIULco6FcoBLxAI_N-B9bnI,2744
4
- aioamazondevices/exceptions.py,sha256=qK_Hak9pc-lC2FPW-0i4rYIwNpEOHMmA9Rii8F2lkQo,1260
5
- aioamazondevices/httpx.py,sha256=DyuD2HD3GGGbBq65qcjPCCxeuSkALKzDAdrUSeZcRMM,4935
6
- aioamazondevices/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- aioamazondevices-2.0.1.dist-info/LICENSE,sha256=sS48k5sp9bFV-NSHDfAJuTZZ_-AP9ZDqUzQ9sffGlsg,11346
8
- aioamazondevices-2.0.1.dist-info/METADATA,sha256=jlG6ij7tCBSa3BhmxqHpn02-zdiwm-uCLE-nUw6tQTA,5031
9
- aioamazondevices-2.0.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
10
- aioamazondevices-2.0.1.dist-info/RECORD,,