aioamazondevices 6.2.2__py3-none-any.whl → 6.2.4__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.
@@ -1,6 +1,6 @@
1
1
  """aioamazondevices library."""
2
2
 
3
- __version__ = "6.2.2"
3
+ __version__ = "6.2.4"
4
4
 
5
5
 
6
6
  from .api import AmazonDevice, AmazonEchoApi
aioamazondevices/api.py CHANGED
@@ -639,7 +639,6 @@ class AmazonEchoApi:
639
639
  scale=None,
640
640
  )
641
641
  for feature in endpoint.get("features", {}):
642
- first_property = (feature.get("properties") or [None])[0] or {}
643
642
  if (sensor := SENSORS.get(feature["name"])) is None:
644
643
  # Skip sensors that are not in the predefined list
645
644
  continue
@@ -647,17 +646,21 @@ class AmazonEchoApi:
647
646
  if not (name := sensor["name"]):
648
647
  raise CannotRetrieveData("Unable to read sensor template")
649
648
 
650
- value = first_property[sensor["key"]]
651
- scale = value["scale"] if sensor["scale"] else None
652
- error = bool(sensor.get("error"))
653
- if subkey := sensor["subkey"]:
654
- value = value[subkey]
655
- device_sensors[name] = AmazonDeviceSensor(
656
- name,
657
- value,
658
- error,
659
- scale,
660
- )
649
+ for feature_property in feature.get("properties"):
650
+ if sensor["name"] != feature_property.get("name"):
651
+ continue
652
+
653
+ value = feature_property[sensor["key"]]
654
+ scale = value["scale"] if sensor["scale"] else None
655
+ error = bool(sensor.get("error"))
656
+ if subkey := sensor["subkey"]:
657
+ value = value[subkey]
658
+ device_sensors[name] = AmazonDeviceSensor(
659
+ name,
660
+ value,
661
+ error,
662
+ scale,
663
+ )
661
664
 
662
665
  return device_sensors
663
666
 
aioamazondevices/const.py CHANGED
@@ -77,7 +77,7 @@ SENSORS: dict[str, dict[str, str | None]] = {
77
77
  "scale": "scale",
78
78
  },
79
79
  "motionSensor": {
80
- "name": "motion",
80
+ "name": "detectionState",
81
81
  "key": "detectionStateValue",
82
82
  "subkey": None,
83
83
  "scale": None,
@@ -112,6 +112,11 @@ DEVICE_TO_IGNORE: list[str] = [
112
112
  "A3KOTUS4DKHU1W", # Samsung Fridge - issue #429
113
113
  "AN630UQPG2CA4", # Insignia TV - issue #430
114
114
  "A3SSG6GR8UU7SN", # Amazon Echo Sub - issue #437
115
+ "A2Y04QPFCANLPQ", # Bose QuietComfort 35 II - issue #476
116
+ "AYHO3NTIQQ04G", # Nextbase 622GW Dash Cam - issue #477
117
+ "AHL4H6CKH3AUP", # BMW Car System - issue #478
118
+ "A3BW5ZVFHRCQPO", # BMW Mini Car System - issue #479
119
+ "A1M0A9L9HDBID3", # Sony Soundbar Sony HT-A5000 - issue #486
115
120
  ]
116
121
 
117
122
  DEVICE_TYPE_TO_MODEL: dict[str, dict[str, str | None]] = {
@@ -431,6 +436,11 @@ DEVICE_TYPE_TO_MODEL: dict[str, dict[str, str | None]] = {
431
436
  "model": "Echo Plus",
432
437
  "hw_version": "Gen2",
433
438
  },
439
+ "A1M0A9L9HDBID3": {
440
+ "manufacturer": "First Alert",
441
+ "model": "Onelink Smoke + Carbon Monoxide Alarm",
442
+ "hw_version": None,
443
+ },
434
444
  }
435
445
 
436
446
  ALEXA_INFO_SKILLS = [
@@ -1,8 +1,9 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: aioamazondevices
3
- Version: 6.2.2
3
+ Version: 6.2.4
4
4
  Summary: Python library to control Amazon devices
5
- License: Apache-2.0
5
+ License-Expression: Apache-2.0
6
+ License-File: LICENSE
6
7
  Author: Simone Chemelli
7
8
  Author-email: simone.chemelli@gmail.com
8
9
  Requires-Python: >=3.12
@@ -0,0 +1,12 @@
1
+ aioamazondevices/__init__.py,sha256=O5sZcBW6O16XeV2LlY-nIVk5ugcMwgXzmtB7xKMd0wo,276
2
+ aioamazondevices/api.py,sha256=zE7q03ok3CoIlKiClAA3tFch3oWdJEu4s61S4ZUEfBw,42277
3
+ aioamazondevices/const.py,sha256=laRFapeQRpg3aGi10iCOH5OzBi1cnaPJX0s1phSl21w,11769
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.4.dist-info/METADATA,sha256=indV-n8QQZYkmaRmhsWVx4DDipUTxNiMgz4nm6DN7Rg,7656
10
+ aioamazondevices-6.2.4.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
11
+ aioamazondevices-6.2.4.dist-info/licenses/LICENSE,sha256=sS48k5sp9bFV-NSHDfAJuTZZ_-AP9ZDqUzQ9sffGlsg,11346
12
+ aioamazondevices-6.2.4.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.3
2
+ Generator: poetry-core 2.2.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,12 +0,0 @@
1
- aioamazondevices/__init__.py,sha256=l0tkEG98GzFalrlMdpBFSWhd8fhDSGHylEp0K3q8hPU,276
2
- aioamazondevices/api.py,sha256=bZi4BVRa5BV5AZV3rWrzsu-viVzOHtlKbINQUNaPYVA,42147
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.2.dist-info/LICENSE,sha256=sS48k5sp9bFV-NSHDfAJuTZZ_-AP9ZDqUzQ9sffGlsg,11346
10
- aioamazondevices-6.2.2.dist-info/METADATA,sha256=I-3gSjc6vAZkmqU3KStRg7d-p268Xl4haeDBEeM42iQ,7623
11
- aioamazondevices-6.2.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
12
- aioamazondevices-6.2.2.dist-info/RECORD,,