aioamazondevices 6.5.1__py3-none-any.whl → 6.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.

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.5.1"
3
+ __version__ = "6.5.2"
4
4
 
5
5
 
6
6
  from .api import AmazonDevice, AmazonEchoApi
aioamazondevices/api.py CHANGED
@@ -62,6 +62,7 @@ from .const import (
62
62
  REQUEST_AGENT,
63
63
  SAVE_PATH,
64
64
  SENSORS,
65
+ SPEAKER_GROUP_FAMILY,
65
66
  URI_DEVICES,
66
67
  URI_DND,
67
68
  URI_NEXUS_GRAPHQL,
@@ -712,14 +713,16 @@ class AmazonEchoApi:
712
713
  _LOGGER.debug(
713
714
  "error in sensor %s - %s - %s", name, error_type, error_msg
714
715
  )
715
- device_sensors[name] = AmazonDeviceSensor(
716
- name,
717
- value,
718
- error,
719
- error_type,
720
- error_msg,
721
- scale,
722
- )
716
+
717
+ if error_type != "NOT_FOUND":
718
+ device_sensors[name] = AmazonDeviceSensor(
719
+ name,
720
+ value,
721
+ error,
722
+ error_type,
723
+ error_msg,
724
+ scale,
725
+ )
723
726
 
724
727
  return device_sensors
725
728
 
@@ -1139,7 +1142,9 @@ class AmazonEchoApi:
1139
1142
  else:
1140
1143
  for device_sensor in device.sensors.values():
1141
1144
  device_sensor.error = True
1142
- if device_dnd := dnd_sensors.get(device.serial_number):
1145
+ if (
1146
+ device_dnd := dnd_sensors.get(device.serial_number)
1147
+ ) and device.device_family != SPEAKER_GROUP_FAMILY:
1143
1148
  device.sensors["dnd"] = device_dnd
1144
1149
 
1145
1150
  # Update notifications
@@ -1208,11 +1213,20 @@ class AmazonEchoApi:
1208
1213
  if not device or (device.get("deviceType") in DEVICE_TO_IGNORE):
1209
1214
  continue
1210
1215
 
1216
+ account_name: str = device["accountName"]
1217
+ capabilities: list[str] = device["capabilities"]
1218
+ # Skip devices that cannot be used with voice features
1219
+ if "MICROPHONE" not in capabilities:
1220
+ _LOGGER.debug(
1221
+ "Skipping device without microphone capabilities: %s", account_name
1222
+ )
1223
+ continue
1224
+
1211
1225
  serial_number: str = device["serialNumber"]
1212
1226
 
1213
1227
  final_devices_list[serial_number] = AmazonDevice(
1214
- account_name=device["accountName"],
1215
- capabilities=device["capabilities"],
1228
+ account_name=account_name,
1229
+ capabilities=capabilities,
1216
1230
  device_family=device["deviceFamily"],
1217
1231
  device_type=device["deviceType"],
1218
1232
  device_owner_customer_id=device["deviceOwnerCustomerId"],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aioamazondevices
3
- Version: 6.5.1
3
+ Version: 6.5.2
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=F9PVHDhnnAwbsRZGVQ6jRtVcKcvPsK2zm7IZVRX_p64,276
2
- aioamazondevices/api.py,sha256=4ut_LNMO4nHD1Fw92XP7hXzTdcOnnYeQC5GynqvSbqk,58409
1
+ aioamazondevices/__init__.py,sha256=EqCH6sGlbFMqGgw0cus1uEuwEYwaeTL_GBP6rK6Jg-c,276
2
+ aioamazondevices/api.py,sha256=Ra53W-d_DQkuF947f1Sgc8tBR0I-Qnf02iaWBezhRgI,58970
3
3
  aioamazondevices/const.py,sha256=EUoGr9gqqwoSz01gk56Nhw_-1Tdmv0Yjyh9cJb3ofbs,13556
4
4
  aioamazondevices/exceptions.py,sha256=gRYrxNAJnrV6uRuMx5e76VMvtNKyceXd09q84pDBBrI,638
5
5
  aioamazondevices/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  aioamazondevices/query.py,sha256=xVgXF1PIiH7uu33Q_iVfCtdH9hqLOAGdCNnAxTZ76UE,1883
7
7
  aioamazondevices/sounds.py,sha256=CXMDk-KoKVFxBdVAw3MeOClqgpzcVDxvQhFOJp7qX-Y,1896
8
8
  aioamazondevices/utils.py,sha256=RzuKRhnq_8ymCoJMoQJ2vBYyuew06RSWpqQWmqdNczE,2019
9
- aioamazondevices-6.5.1.dist-info/METADATA,sha256=2XGsEjNlJpCKx4ffTMoEO_WjRnEuuU693ST-pRE0y1Q,7679
10
- aioamazondevices-6.5.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
11
- aioamazondevices-6.5.1.dist-info/licenses/LICENSE,sha256=sS48k5sp9bFV-NSHDfAJuTZZ_-AP9ZDqUzQ9sffGlsg,11346
12
- aioamazondevices-6.5.1.dist-info/RECORD,,
9
+ aioamazondevices-6.5.2.dist-info/METADATA,sha256=5amsAnwYlrSkQj7DEzKrKYnJQSEX_p-Wv_T-uVWs3fc,7679
10
+ aioamazondevices-6.5.2.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
11
+ aioamazondevices-6.5.2.dist-info/licenses/LICENSE,sha256=sS48k5sp9bFV-NSHDfAJuTZZ_-AP9ZDqUzQ9sffGlsg,11346
12
+ aioamazondevices-6.5.2.dist-info/RECORD,,