aioamazondevices 4.0.0__py3-none-any.whl → 4.0.2__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.
- aioamazondevices/__init__.py +1 -1
- aioamazondevices/api.py +7 -7
- aioamazondevices/const.py +18 -4
- {aioamazondevices-4.0.0.dist-info → aioamazondevices-4.0.2.dist-info}/METADATA +14 -7
- aioamazondevices-4.0.2.dist-info/RECORD +11 -0
- aioamazondevices-4.0.0.dist-info/RECORD +0 -11
- {aioamazondevices-4.0.0.dist-info → aioamazondevices-4.0.2.dist-info}/LICENSE +0 -0
- {aioamazondevices-4.0.0.dist-info → aioamazondevices-4.0.2.dist-info}/WHEEL +0 -0
aioamazondevices/__init__.py
CHANGED
aioamazondevices/api.py
CHANGED
@@ -131,10 +131,10 @@ class AmazonEchoApi:
|
|
131
131
|
# Force country digits as lower case
|
132
132
|
country_code = login_country_code.lower()
|
133
133
|
|
134
|
-
locale = DOMAIN_BY_ISO3166_COUNTRY.get(country_code, {})
|
135
|
-
domain = locale.get("domain", country_code)
|
136
|
-
market = locale.get("market", f"https://www.amazon.{domain}")
|
137
|
-
assoc_handle = locale.get(
|
134
|
+
locale: dict = DOMAIN_BY_ISO3166_COUNTRY.get(country_code, {})
|
135
|
+
domain: str = locale.get("domain", country_code)
|
136
|
+
market: list[str] = locale.get("market", [f"https://www.amazon.{domain}"])
|
137
|
+
assoc_handle: str = locale.get(
|
138
138
|
"openid.assoc_handle", f"{DEFAULT_ASSOC_HANDLE}_{country_code}"
|
139
139
|
)
|
140
140
|
|
@@ -587,9 +587,9 @@ class AmazonEchoApi:
|
|
587
587
|
resp_me_json = await resp_me.json()
|
588
588
|
amazon_market = resp_me_json["marketPlaceDomainName"]
|
589
589
|
|
590
|
-
if amazon_market
|
590
|
+
if amazon_market not in self._market:
|
591
591
|
_LOGGER.warning(
|
592
|
-
"Selected country <%s> doesn't
|
592
|
+
"Selected country <%s> doesn't match Amazon API reply:\n%s\n vs \n%s",
|
593
593
|
self._login_country_code.upper(),
|
594
594
|
{"input ": self._market},
|
595
595
|
{"amazon": amazon_market},
|
@@ -933,7 +933,7 @@ class AmazonEchoApi:
|
|
933
933
|
) -> None:
|
934
934
|
"""Send message to specific device."""
|
935
935
|
if not self._login_stored_data:
|
936
|
-
_LOGGER.warning("
|
936
|
+
_LOGGER.warning("No login data available, cannot send message")
|
937
937
|
return
|
938
938
|
|
939
939
|
base_payload = {
|
aioamazondevices/const.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
"""Constants for Amazon devices."""
|
2
2
|
|
3
3
|
import logging
|
4
|
+
from typing import Any
|
4
5
|
|
5
6
|
_LOGGER = logging.getLogger(__package__)
|
6
7
|
|
@@ -30,16 +31,16 @@ TO_REDACT = {
|
|
30
31
|
"user_id",
|
31
32
|
}
|
32
33
|
|
33
|
-
AMAZON_DE_OVERRIDE = {
|
34
|
+
AMAZON_DE_OVERRIDE: dict[str, str] = {
|
34
35
|
"domain": "de",
|
35
36
|
"openid.assoc_handle": f"{DEFAULT_ASSOC_HANDLE}_de",
|
36
37
|
}
|
37
|
-
AMAZON_US_OVERRIDE = {
|
38
|
+
AMAZON_US_OVERRIDE: dict[str, str] = {
|
38
39
|
"domain": "com",
|
39
40
|
"openid.assoc_handle": DEFAULT_ASSOC_HANDLE,
|
40
41
|
}
|
41
42
|
|
42
|
-
DOMAIN_BY_ISO3166_COUNTRY = {
|
43
|
+
DOMAIN_BY_ISO3166_COUNTRY: dict[str, dict[str, Any]] = {
|
43
44
|
"ar": AMAZON_US_OVERRIDE,
|
44
45
|
"at": AMAZON_DE_OVERRIDE,
|
45
46
|
"au": {
|
@@ -70,6 +71,7 @@ DOMAIN_BY_ISO3166_COUNTRY = {
|
|
70
71
|
"domain": "com.au",
|
71
72
|
"openid.assoc_handle": f"{DEFAULT_ASSOC_HANDLE}_au",
|
72
73
|
},
|
74
|
+
"pl": AMAZON_US_OVERRIDE,
|
73
75
|
"tr": {
|
74
76
|
"domain": "com.tr",
|
75
77
|
},
|
@@ -158,6 +160,10 @@ DEVICE_TO_IGNORE: list[str] = [
|
|
158
160
|
"A1L4KDRIILU6N9", # Sony headset WH-CH700N - issue #345
|
159
161
|
"A2IJJ9QXVOSYK0", # JBL TUNE770NC - issue #391
|
160
162
|
"AKOAGQTKAS9YB", # Amazon Echo Connect - issue #406
|
163
|
+
"A3PAHYZLPKL73D", # EERO 6 Wifi AP - issue #426
|
164
|
+
"A3KOTUS4DKHU1W", # Samsung Fridge - issue #429
|
165
|
+
"AN630UQPG2CA4", # Insignia TV - issue #430
|
166
|
+
"A3SSG6GR8UU7SN", # Amazon Echo Sub - issue #437
|
161
167
|
]
|
162
168
|
|
163
169
|
DEVICE_TYPE_TO_MODEL: dict[str, dict[str, str | None]] = {
|
@@ -242,13 +248,17 @@ DEVICE_TYPE_TO_MODEL: dict[str, dict[str, str | None]] = {
|
|
242
248
|
"model": "Echo Dot Clock",
|
243
249
|
"hw_version": "Gen5",
|
244
250
|
},
|
251
|
+
"A2E0SNTXJVT7WK ": {
|
252
|
+
"model": "Fire TV Stick",
|
253
|
+
"hw_version": "Gen2",
|
254
|
+
},
|
245
255
|
"A2F7IJUT32OLN4": {
|
246
256
|
"manufacturer": "Samsung Electronics Co., Ltd.",
|
247
257
|
"model": "Soundbar Q990D",
|
248
258
|
"hw_version": None,
|
249
259
|
},
|
250
260
|
"A2GFL5ZMWNE0PX": {
|
251
|
-
"model": "Fire TV",
|
261
|
+
"model": "Fire TV Stick",
|
252
262
|
"hw_version": "Gen3",
|
253
263
|
},
|
254
264
|
"A2H4LV5GIZ1JFT": {
|
@@ -456,6 +466,10 @@ DEVICE_TYPE_TO_MODEL: dict[str, dict[str, str | None]] = {
|
|
456
466
|
"model": "Fire Tablet HD 8 Plus",
|
457
467
|
"hw_version": "Gen10",
|
458
468
|
},
|
469
|
+
"AWZZ5CVHX2CD": {
|
470
|
+
"model": "Echo Show",
|
471
|
+
"hw_version": "Gen2",
|
472
|
+
},
|
459
473
|
"G2A0V704840708AP": {
|
460
474
|
"model": "Echo Plus",
|
461
475
|
"hw_version": "Gen2",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: aioamazondevices
|
3
|
-
Version: 4.0.
|
3
|
+
Version: 4.0.2
|
4
4
|
Summary: Python library to control Amazon devices
|
5
5
|
License: Apache-2.0
|
6
6
|
Author: Simone Chemelli
|
@@ -114,17 +114,17 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
114
114
|
</a>
|
115
115
|
</td>
|
116
116
|
<td align="center">
|
117
|
-
<a href="https://github.com/
|
118
|
-
<img src="https://avatars.githubusercontent.com/u/
|
117
|
+
<a href="https://github.com/jamesonuk">
|
118
|
+
<img src="https://avatars.githubusercontent.com/u/1040621?v=4" width="100;" alt="jamesonuk"/>
|
119
119
|
<br />
|
120
|
-
<sub><b>
|
120
|
+
<sub><b>jameson_uk</b></sub>
|
121
121
|
</a>
|
122
122
|
</td>
|
123
123
|
<td align="center">
|
124
|
-
<a href="https://github.com/
|
125
|
-
<img src="https://avatars.githubusercontent.com/u/
|
124
|
+
<a href="https://github.com/jeeftor">
|
125
|
+
<img src="https://avatars.githubusercontent.com/u/6491743?v=4" width="100;" alt="jeeftor"/>
|
126
126
|
<br />
|
127
|
-
<sub><b>
|
127
|
+
<sub><b>Jeef</b></sub>
|
128
128
|
</a>
|
129
129
|
</td>
|
130
130
|
<td align="center">
|
@@ -150,6 +150,13 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
150
150
|
</td>
|
151
151
|
</tr>
|
152
152
|
<tr>
|
153
|
+
<td align="center">
|
154
|
+
<a href="https://github.com/maxmati">
|
155
|
+
<img src="https://avatars.githubusercontent.com/u/509560?v=4" width="100;" alt="maxmati"/>
|
156
|
+
<br />
|
157
|
+
<sub><b>Mateusz Nowotyński</b></sub>
|
158
|
+
</a>
|
159
|
+
</td>
|
153
160
|
<td align="center">
|
154
161
|
<a href="https://github.com/tronikos">
|
155
162
|
<img src="https://avatars.githubusercontent.com/u/9987465?v=4" width="100;" alt="tronikos"/>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
aioamazondevices/__init__.py,sha256=wSNWfC1MgCh-mlyEBw9dZoHqLaphYLj1vse-JSgLf1M,276
|
2
|
+
aioamazondevices/api.py,sha256=HIgewk7CuYpNeflPjX0EarKMYmrMuOP0weKUJD1oY2Q,41075
|
3
|
+
aioamazondevices/const.py,sha256=4fI9LSfRC4Xa7wchlx9_zxO5AneDkPWwFlWlKs69Z5g,11898
|
4
|
+
aioamazondevices/exceptions.py,sha256=CfOFKDvE_yl5BFoFcpTOuDfgRi_2oAtKk-nNJgfWBAs,726
|
5
|
+
aioamazondevices/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
+
aioamazondevices/sounds.py,sha256=01pVCDFIuhrLypXInw4JNuHsC6zjMLsuKocet1R6we8,13409
|
7
|
+
aioamazondevices/utils.py,sha256=RzuKRhnq_8ymCoJMoQJ2vBYyuew06RSWpqQWmqdNczE,2019
|
8
|
+
aioamazondevices-4.0.2.dist-info/LICENSE,sha256=sS48k5sp9bFV-NSHDfAJuTZZ_-AP9ZDqUzQ9sffGlsg,11346
|
9
|
+
aioamazondevices-4.0.2.dist-info/METADATA,sha256=4hKjAUjHtLxSo0T8pErD5o9UQ7S1CTgMZ1CdHt_HLzI,7572
|
10
|
+
aioamazondevices-4.0.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
11
|
+
aioamazondevices-4.0.2.dist-info/RECORD,,
|
@@ -1,11 +0,0 @@
|
|
1
|
-
aioamazondevices/__init__.py,sha256=dxcRXZo_Igm5QFYs4kz9Cy4_BqaW--Gp2pvKJLLH9SA,276
|
2
|
-
aioamazondevices/api.py,sha256=m_0_Gk7BcJXG8fURe9UnesAbrPWuz7RlH8bGmdpIlmE,41035
|
3
|
-
aioamazondevices/const.py,sha256=1v0CFgGrf99tnfxKED7B-uvbT7rpiVJzFV6cjFmEoOM,11386
|
4
|
-
aioamazondevices/exceptions.py,sha256=CfOFKDvE_yl5BFoFcpTOuDfgRi_2oAtKk-nNJgfWBAs,726
|
5
|
-
aioamazondevices/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
-
aioamazondevices/sounds.py,sha256=01pVCDFIuhrLypXInw4JNuHsC6zjMLsuKocet1R6we8,13409
|
7
|
-
aioamazondevices/utils.py,sha256=RzuKRhnq_8ymCoJMoQJ2vBYyuew06RSWpqQWmqdNczE,2019
|
8
|
-
aioamazondevices-4.0.0.dist-info/LICENSE,sha256=sS48k5sp9bFV-NSHDfAJuTZZ_-AP9ZDqUzQ9sffGlsg,11346
|
9
|
-
aioamazondevices-4.0.0.dist-info/METADATA,sha256=Klv2Gt-q7ArMlI_0pdVlAQkxYgsC9T_fIgkA_vktxjs,7251
|
10
|
-
aioamazondevices-4.0.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
11
|
-
aioamazondevices-4.0.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|