aioamazondevices 6.2.7__py3-none-any.whl → 6.2.8__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.

Potentially problematic release.


This version of aioamazondevices might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  """aioamazondevices library."""
2
2
 
3
- __version__ = "6.2.7"
3
+ __version__ = "6.2.8"
4
4
 
5
5
 
6
6
  from .api import AmazonDevice, AmazonEchoApi
aioamazondevices/api.py CHANGED
@@ -602,7 +602,19 @@ class AmazonEchoApi:
602
602
  devices_sensors: dict[str, dict[str, AmazonDeviceSensor]] = {}
603
603
  devices_endpoints: dict[str, dict[str, Any]] = {}
604
604
 
605
- endpoints = devices_state["data"]["listEndpoints"]
605
+ if error := devices_state.get("errors"):
606
+ if isinstance(error, list):
607
+ error = error[0]
608
+ msg = error.get("message", "Unknown error")
609
+ path = error.get("path", "Unknown path")
610
+ _LOGGER.error("Error retrieving devices state: %s for path %s", msg, path)
611
+ return {}, {}
612
+
613
+ if not (data := devices_state.get("data")) or not data.get("listEndpoints"):
614
+ _LOGGER.error("Malformed devices state data received: %s", devices_state)
615
+ return {}, {}
616
+
617
+ endpoints = data["listEndpoints"]
606
618
  for endpoint in endpoints.get("endpoints"):
607
619
  serial_number = (
608
620
  endpoint["serialNumber"]["value"]["text"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aioamazondevices
3
- Version: 6.2.7
3
+ Version: 6.2.8
4
4
  Summary: Python library to control Amazon devices
5
5
  License-Expression: Apache-2.0
6
6
  License-File: LICENSE
@@ -1,12 +1,12 @@
1
- aioamazondevices/__init__.py,sha256=7ypbsqEYHFGm1dMAGooQibrUEoO6tovsrqDr7KH7WwE,276
2
- aioamazondevices/api.py,sha256=6F4UwDNuQXsdfVxpZKXSWVIKsoNgoFJ2whguJxT0hEM,43558
1
+ aioamazondevices/__init__.py,sha256=fC_cVxoQ9UV0g3MPcq9xo24JwXEXPPXuU1x5i1IA00o,276
2
+ aioamazondevices/api.py,sha256=xJyDMmWDizrr4k8cpoUtr3FMb7A0K3y-ls9sbh3x0lw,44084
3
3
  aioamazondevices/const.py,sha256=pPjMhNABj3rN8uvHzqj41tDiGPx-C50QRcSckvzX9z8,11561
4
4
  aioamazondevices/exceptions.py,sha256=gRYrxNAJnrV6uRuMx5e76VMvtNKyceXd09q84pDBBrI,638
5
5
  aioamazondevices/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  aioamazondevices/query.py,sha256=qLCuNyVlSbvVQmckZUsmftsz8s04GIukdidsOo4BrD0,2084
7
7
  aioamazondevices/sounds.py,sha256=CXMDk-KoKVFxBdVAw3MeOClqgpzcVDxvQhFOJp7qX-Y,1896
8
8
  aioamazondevices/utils.py,sha256=RzuKRhnq_8ymCoJMoQJ2vBYyuew06RSWpqQWmqdNczE,2019
9
- aioamazondevices-6.2.7.dist-info/METADATA,sha256=Ap2Tr3-p6e0kSf3IEdz9Vj-cqrp_EmA97IFsRb54weg,7656
10
- aioamazondevices-6.2.7.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
11
- aioamazondevices-6.2.7.dist-info/licenses/LICENSE,sha256=sS48k5sp9bFV-NSHDfAJuTZZ_-AP9ZDqUzQ9sffGlsg,11346
12
- aioamazondevices-6.2.7.dist-info/RECORD,,
9
+ aioamazondevices-6.2.8.dist-info/METADATA,sha256=HM04uPbCYPajVoqRxnrnywFsqV7YUmHDEupi0qWLd1k,7656
10
+ aioamazondevices-6.2.8.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
11
+ aioamazondevices-6.2.8.dist-info/licenses/LICENSE,sha256=sS48k5sp9bFV-NSHDfAJuTZZ_-AP9ZDqUzQ9sffGlsg,11346
12
+ aioamazondevices-6.2.8.dist-info/RECORD,,