aioamazondevices 6.2.0__py3-none-any.whl → 6.2.1__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 +6 -4
- aioamazondevices/exceptions.py +1 -1
- {aioamazondevices-6.2.0.dist-info → aioamazondevices-6.2.1.dist-info}/METADATA +1 -1
- aioamazondevices-6.2.1.dist-info/RECORD +12 -0
- aioamazondevices-6.2.0.dist-info/RECORD +0 -12
- {aioamazondevices-6.2.0.dist-info → aioamazondevices-6.2.1.dist-info}/LICENSE +0 -0
- {aioamazondevices-6.2.0.dist-info → aioamazondevices-6.2.1.dist-info}/WHEEL +0 -0
aioamazondevices/__init__.py
CHANGED
aioamazondevices/api.py
CHANGED
|
@@ -278,7 +278,7 @@ class AmazonEchoApi:
|
|
|
278
278
|
form = soup.find("form", {"name": "signIn"}) or soup.find("form")
|
|
279
279
|
|
|
280
280
|
if not isinstance(form, Tag):
|
|
281
|
-
raise
|
|
281
|
+
raise CannotAuthenticate("Unable to find form in login response")
|
|
282
282
|
|
|
283
283
|
inputs = {}
|
|
284
284
|
for field in form.find_all("input"):
|
|
@@ -296,7 +296,7 @@ class AmazonEchoApi:
|
|
|
296
296
|
url = form.get("action")
|
|
297
297
|
if isinstance(method, str) and isinstance(url, str):
|
|
298
298
|
return method, url
|
|
299
|
-
raise
|
|
299
|
+
raise CannotAuthenticate("Unable to extract form data from response")
|
|
300
300
|
|
|
301
301
|
def _extract_code_from_url(self, url: URL) -> str:
|
|
302
302
|
"""Extract the access token from url query after login."""
|
|
@@ -307,7 +307,9 @@ class AmazonEchoApi:
|
|
|
307
307
|
for key, value in url.query.items():
|
|
308
308
|
parsed_url[key] = [value]
|
|
309
309
|
else:
|
|
310
|
-
raise
|
|
310
|
+
raise CannotAuthenticate(
|
|
311
|
+
f"Unable to extract authorization code from url: {url}"
|
|
312
|
+
)
|
|
311
313
|
return parsed_url["openid.oa2.authorization_code"][0]
|
|
312
314
|
|
|
313
315
|
async def _ignore_ap_signin_error(self, response: ClientResponse) -> bool:
|
|
@@ -643,7 +645,7 @@ class AmazonEchoApi:
|
|
|
643
645
|
continue
|
|
644
646
|
|
|
645
647
|
if not (name := sensor["name"]):
|
|
646
|
-
raise
|
|
648
|
+
raise CannotRetrieveData("Unable to read sensor template")
|
|
647
649
|
|
|
648
650
|
value = first_property[sensor["key"]]
|
|
649
651
|
scale = value["scale"] if sensor["scale"] else None
|
aioamazondevices/exceptions.py
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
aioamazondevices/__init__.py,sha256=hyj8SeDdWcZIzCXEj67RXp4kviqHhwmsvg-yNVpzAas,276
|
|
2
|
+
aioamazondevices/api.py,sha256=7LY15R-f1NURGPYoSJw7gJ6PIZH9Eg8iNdZIk8hjcc4,42039
|
|
3
|
+
aioamazondevices/const.py,sha256=38dhNRpwEJf0FgFQGjt3ONhLdQxjiNrnlcrmQ1AY8oU,11306
|
|
4
|
+
aioamazondevices/exceptions.py,sha256=gRYrxNAJnrV6uRuMx5e76VMvtNKyceXd09q84pDBBrI,638
|
|
5
|
+
aioamazondevices/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
aioamazondevices/query.py,sha256=AGHHzefzfYzB7RLWPtlFxYc_rpUZdoeApsU2jYz3urQ,2053
|
|
7
|
+
aioamazondevices/sounds.py,sha256=CXMDk-KoKVFxBdVAw3MeOClqgpzcVDxvQhFOJp7qX-Y,1896
|
|
8
|
+
aioamazondevices/utils.py,sha256=RzuKRhnq_8ymCoJMoQJ2vBYyuew06RSWpqQWmqdNczE,2019
|
|
9
|
+
aioamazondevices-6.2.1.dist-info/LICENSE,sha256=sS48k5sp9bFV-NSHDfAJuTZZ_-AP9ZDqUzQ9sffGlsg,11346
|
|
10
|
+
aioamazondevices-6.2.1.dist-info/METADATA,sha256=Kxx8XQfmFkRMsY3ZnCIofSvQus6p4xHZ6BMEZdmU5nc,7623
|
|
11
|
+
aioamazondevices-6.2.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
12
|
+
aioamazondevices-6.2.1.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
aioamazondevices/__init__.py,sha256=oT6YOexUE4rV5rAbI-rUuZ6XGk2jXwetnm_lzg-wTSU,276
|
|
2
|
-
aioamazondevices/api.py,sha256=spUjgxRW9qPKVzV9RwIX4QzkxrqwCrvM-MbdSxAE6u4,41973
|
|
3
|
-
aioamazondevices/const.py,sha256=38dhNRpwEJf0FgFQGjt3ONhLdQxjiNrnlcrmQ1AY8oU,11306
|
|
4
|
-
aioamazondevices/exceptions.py,sha256=JDnSFi_7oEhqK31sHXf0S_cyMoMjiRJuLp4ow7mYgLY,643
|
|
5
|
-
aioamazondevices/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
aioamazondevices/query.py,sha256=AGHHzefzfYzB7RLWPtlFxYc_rpUZdoeApsU2jYz3urQ,2053
|
|
7
|
-
aioamazondevices/sounds.py,sha256=CXMDk-KoKVFxBdVAw3MeOClqgpzcVDxvQhFOJp7qX-Y,1896
|
|
8
|
-
aioamazondevices/utils.py,sha256=RzuKRhnq_8ymCoJMoQJ2vBYyuew06RSWpqQWmqdNczE,2019
|
|
9
|
-
aioamazondevices-6.2.0.dist-info/LICENSE,sha256=sS48k5sp9bFV-NSHDfAJuTZZ_-AP9ZDqUzQ9sffGlsg,11346
|
|
10
|
-
aioamazondevices-6.2.0.dist-info/METADATA,sha256=HLWbqGs_h6-Jb-Ck5ojVO3S87c_KLT8MiuIbxAsOiU8,7623
|
|
11
|
-
aioamazondevices-6.2.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
12
|
-
aioamazondevices-6.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|