aioamazondevices 3.5.0__py3-none-any.whl → 3.5.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 +13 -14
- aioamazondevices/const.py +41 -5
- {aioamazondevices-3.5.0.dist-info → aioamazondevices-3.5.2.dist-info}/METADATA +1 -1
- aioamazondevices-3.5.2.dist-info/RECORD +11 -0
- aioamazondevices-3.5.0.dist-info/RECORD +0 -11
- {aioamazondevices-3.5.0.dist-info → aioamazondevices-3.5.2.dist-info}/LICENSE +0 -0
- {aioamazondevices-3.5.0.dist-info → aioamazondevices-3.5.2.dist-info}/WHEEL +0 -0
aioamazondevices/__init__.py
CHANGED
aioamazondevices/api.py
CHANGED
@@ -129,19 +129,19 @@ class AmazonEchoApi:
|
|
129
129
|
# Force country digits as lower case
|
130
130
|
country_code = login_country_code.lower()
|
131
131
|
|
132
|
-
locale = DOMAIN_BY_ISO3166_COUNTRY.get(country_code)
|
133
|
-
domain = locale
|
132
|
+
locale = DOMAIN_BY_ISO3166_COUNTRY.get(country_code, {})
|
133
|
+
domain = locale.get("domain", country_code)
|
134
|
+
market = locale.get("market", f"https://www.amazon.{domain}")
|
135
|
+
assoc_handle = locale.get(
|
136
|
+
"openid.assoc_handle", f"{DEFAULT_ASSOC_HANDLE}_{country_code}"
|
137
|
+
)
|
134
138
|
|
135
|
-
if locale and (assoc := locale.get("openid.assoc_handle")):
|
136
|
-
assoc_handle = assoc
|
137
|
-
else:
|
138
|
-
assoc_handle = f"{DEFAULT_ASSOC_HANDLE}_{country_code}"
|
139
139
|
self._assoc_handle = assoc_handle
|
140
|
-
|
141
140
|
self._login_email = login_email
|
142
141
|
self._login_password = login_password
|
143
142
|
self._login_country_code = country_code
|
144
143
|
self._domain = domain
|
144
|
+
self._market = market
|
145
145
|
self._cookies = self._build_init_cookies()
|
146
146
|
self._csrf_cookie: str | None = None
|
147
147
|
self._save_raw_data = save_raw_data
|
@@ -158,9 +158,10 @@ class AmazonEchoApi:
|
|
158
158
|
self._language = f"{lang_maximized.language}-{lang_maximized.region}"
|
159
159
|
|
160
160
|
_LOGGER.debug(
|
161
|
-
"Initialize library
|
161
|
+
"Initialize library: domain <amazon.%s>, language <%s>, market: <%s>",
|
162
162
|
self._domain,
|
163
163
|
self._language,
|
164
|
+
self._market,
|
164
165
|
)
|
165
166
|
|
166
167
|
def _load_website_cookies(self) -> dict[str, str]:
|
@@ -584,16 +585,14 @@ class AmazonEchoApi:
|
|
584
585
|
raise CannotAuthenticate
|
585
586
|
|
586
587
|
resp_me_json = await resp_me.json()
|
587
|
-
|
588
|
-
|
589
|
-
_domain = f"https://www.amazon.{self._domain}"
|
588
|
+
amazon_market = resp_me_json["marketPlaceDomainName"]
|
590
589
|
|
591
|
-
if
|
590
|
+
if amazon_market != self._market:
|
592
591
|
_LOGGER.warning(
|
593
592
|
"Selected country <%s> doesn't matches Amazon API reply:\n%s\n vs \n%s",
|
594
593
|
self._login_country_code.upper(),
|
595
|
-
{"
|
596
|
-
{"
|
594
|
+
{"input ": self._market},
|
595
|
+
{"amazon": amazon_market},
|
597
596
|
)
|
598
597
|
raise WrongCountry
|
599
598
|
|
aioamazondevices/const.py
CHANGED
@@ -49,9 +49,7 @@ DOMAIN_BY_ISO3166_COUNTRY = {
|
|
49
49
|
"be": {
|
50
50
|
"domain": "com.be",
|
51
51
|
},
|
52
|
-
"br": {
|
53
|
-
"domain": "com.br",
|
54
|
-
},
|
52
|
+
"br": AMAZON_US_OVERRIDE | {"market": "https://www.amazon.com.br"},
|
55
53
|
"gb": {
|
56
54
|
"domain": "co.uk",
|
57
55
|
"openid.assoc_handle": f"{DEFAULT_ASSOC_HANDLE}_uk",
|
@@ -63,6 +61,10 @@ DOMAIN_BY_ISO3166_COUNTRY = {
|
|
63
61
|
"mx": {
|
64
62
|
"domain": "com.mx",
|
65
63
|
},
|
64
|
+
"nl": {
|
65
|
+
"domain": "nl",
|
66
|
+
"market": "https://www.amazon.co.uk",
|
67
|
+
},
|
66
68
|
"no": AMAZON_DE_OVERRIDE,
|
67
69
|
"nz": {
|
68
70
|
"domain": "com.au",
|
@@ -147,6 +149,7 @@ DEVICE_TO_IGNORE: list[str] = [
|
|
147
149
|
AMAZON_DEVICE_TYPE, # Alexa App for iOS
|
148
150
|
"A2TF17PFR55MTB", # Alexa App for Android
|
149
151
|
"A1RTAM01W29CUP", # Alexa App for PC
|
152
|
+
"A18BI6KPKDOEI4", # ecobee4 Smart Thermostat with Built-in Alexa - issue #199
|
150
153
|
]
|
151
154
|
|
152
155
|
DEVICE_TYPE_TO_MODEL: dict[str, dict[str, str | None]] = {
|
@@ -170,6 +173,10 @@ DEVICE_TYPE_TO_MODEL: dict[str, dict[str, str | None]] = {
|
|
170
173
|
"model": "Echo Plus",
|
171
174
|
"hw_version": "Gen2",
|
172
175
|
},
|
176
|
+
"A1C66CX2XD756O": {
|
177
|
+
"model": "Fire Tablet HD 8",
|
178
|
+
"hw_version": "Gen8",
|
179
|
+
},
|
173
180
|
"A1EIANJ7PNB0Q7": {
|
174
181
|
"model": "Echo Show 15",
|
175
182
|
"hw_version": "Gen1",
|
@@ -182,12 +189,16 @@ DEVICE_TYPE_TO_MODEL: dict[str, dict[str, str | None]] = {
|
|
182
189
|
"model": "Fire TV Stick 4K",
|
183
190
|
"hw_version": "Gen2",
|
184
191
|
},
|
192
|
+
"A1Q7QCGNMXAKYW": {
|
193
|
+
"model": "Fire Tablet 7",
|
194
|
+
"hw_version": "Gen9",
|
195
|
+
},
|
185
196
|
"A1RABVCI4QCIKC": {
|
186
197
|
"model": "Echo Dot",
|
187
198
|
"hw_version": "Gen3",
|
188
199
|
},
|
189
200
|
"A1TD5Z1R8IWBHA ": {
|
190
|
-
"model": "Fire HD 8",
|
201
|
+
"model": "Fire Tablet HD 8",
|
191
202
|
"hw_version": "Gen12",
|
192
203
|
},
|
193
204
|
"A1VGB7MHSIEYFK": {
|
@@ -248,9 +259,13 @@ DEVICE_TYPE_TO_MODEL: dict[str, dict[str, str | None]] = {
|
|
248
259
|
"hw_version": "Gen5",
|
249
260
|
},
|
250
261
|
"A2N49KXGVA18AR": {
|
251
|
-
"model": "Fire HD 10 Plus",
|
262
|
+
"model": "Fire Tablet HD 10 Plus",
|
252
263
|
"hw_version": "Gen11",
|
253
264
|
},
|
265
|
+
"A2RU4B77X9R9NZ": {
|
266
|
+
"model": "Echo Link Amp",
|
267
|
+
"hw_version": None,
|
268
|
+
},
|
254
269
|
"A2U21SRK4QGSE1": {
|
255
270
|
"model": "Echo Dot",
|
256
271
|
"hw_version": "Gen4",
|
@@ -267,6 +282,10 @@ DEVICE_TYPE_TO_MODEL: dict[str, dict[str, str | None]] = {
|
|
267
282
|
"model": "Echo Dot",
|
268
283
|
"hw_version": "Gen3",
|
269
284
|
},
|
285
|
+
"A31DTMEEVDDOIV": {
|
286
|
+
"model": "Fire TV Stick Lite",
|
287
|
+
"hw_version": "Gen1",
|
288
|
+
},
|
270
289
|
"A32DDESGESSHZA": {
|
271
290
|
"model": "Echo Dot",
|
272
291
|
"hw_version": "Gen3",
|
@@ -279,6 +298,15 @@ DEVICE_TYPE_TO_MODEL: dict[str, dict[str, str | None]] = {
|
|
279
298
|
"model": "Smart TV 4K",
|
280
299
|
"hw_version": "4 Series",
|
281
300
|
},
|
301
|
+
"A38949IHXHRQ5P": {
|
302
|
+
"model": "Echo Tap",
|
303
|
+
"hw_version": "Gen1",
|
304
|
+
},
|
305
|
+
"A39OV95SPFQ9YG": {
|
306
|
+
"manufacturer": "Sonos Inc.",
|
307
|
+
"model": "Sonos Era 100",
|
308
|
+
"hw_version": None,
|
309
|
+
},
|
282
310
|
"A3C9PE6TNYLTCH": {
|
283
311
|
"model": "Speaker Group",
|
284
312
|
"hw_version": None,
|
@@ -291,10 +319,18 @@ DEVICE_TYPE_TO_MODEL: dict[str, dict[str, str | None]] = {
|
|
291
319
|
"model": "FireTV 4k MAX",
|
292
320
|
"hw_version": "Gen1",
|
293
321
|
},
|
322
|
+
"A3FX4UWTP28V1P": {
|
323
|
+
"model": "Echo",
|
324
|
+
"hw_version": "Gen3",
|
325
|
+
},
|
294
326
|
"A3HF4YRA2L7XGC": {
|
295
327
|
"model": "Fire TV Cube",
|
296
328
|
"hw_version": "Gen1",
|
297
329
|
},
|
330
|
+
"A3HND3J60V1OXX": {
|
331
|
+
"model": "Echo Loop",
|
332
|
+
"hw_version": None,
|
333
|
+
},
|
298
334
|
"A3NPD82ABCPIDP": {
|
299
335
|
"manufacturer": "Sonos Inc.",
|
300
336
|
"model": "Sonos Beam",
|
@@ -0,0 +1,11 @@
|
|
1
|
+
aioamazondevices/__init__.py,sha256=XxgtV5nRMPObJ911_UWB2jALh4FLymhSyGIQ2Ys-EOo,276
|
2
|
+
aioamazondevices/api.py,sha256=kFdkvBHlGI1OITnRt1j8eASdVOzPLuftSF4U5jb6j28,40686
|
3
|
+
aioamazondevices/const.py,sha256=bX9gEelB-DygkxTzXfXhjwaAnufSOheAT4QE4saHQ44,10022
|
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-3.5.2.dist-info/LICENSE,sha256=sS48k5sp9bFV-NSHDfAJuTZZ_-AP9ZDqUzQ9sffGlsg,11346
|
9
|
+
aioamazondevices-3.5.2.dist-info/METADATA,sha256=9hC0hUiGU-TM-0uKjHTecb_nwyZn1S-EjKAc3rFt1oU,6929
|
10
|
+
aioamazondevices-3.5.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
11
|
+
aioamazondevices-3.5.2.dist-info/RECORD,,
|
@@ -1,11 +0,0 @@
|
|
1
|
-
aioamazondevices/__init__.py,sha256=SO50Vs8-iDMMTQLhMsVQ6k0U00dNKsYyi7_Pyu2hORk,276
|
2
|
-
aioamazondevices/api.py,sha256=e2wrZeOPbAzhMKHgTYbAozvDq_isIQTtLhfxrSev5kI,40640
|
3
|
-
aioamazondevices/const.py,sha256=qeaGMLGKH4r-84EjBvMzj1BcwgRRcDD551TUsUu4AiI,9029
|
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-3.5.0.dist-info/LICENSE,sha256=sS48k5sp9bFV-NSHDfAJuTZZ_-AP9ZDqUzQ9sffGlsg,11346
|
9
|
-
aioamazondevices-3.5.0.dist-info/METADATA,sha256=uYsNGuIZW5xxdRy7rgbhUKx-PWcpDfmFP-7gvE3fFfE,6929
|
10
|
-
aioamazondevices-3.5.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
11
|
-
aioamazondevices-3.5.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|