aioamazondevices 3.0.8__py3-none-any.whl → 3.0.10__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__ = "3.0.8"
3
+ __version__ = "3.0.10"
4
4
 
5
5
 
6
6
  from .api import AmazonDevice, AmazonEchoApi
aioamazondevices/api.py CHANGED
@@ -34,6 +34,7 @@ from .const import (
34
34
  CSRF_COOKIE,
35
35
  DEFAULT_ASSOC_HANDLE,
36
36
  DEFAULT_HEADERS,
37
+ DEVICE_TO_IGNORE,
37
38
  DEVICE_TYPE_TO_MODEL,
38
39
  DOMAIN_BY_ISO3166_COUNTRY,
39
40
  HTML_EXTENSION,
@@ -303,7 +304,7 @@ class AmazonEchoApi:
303
304
  headers.update(csrf)
304
305
 
305
306
  if json_data:
306
- json_header = {"Content-Type": "application/json"}
307
+ json_header = {"Content-Type": "application/json; charset=utf-8"}
307
308
  _LOGGER.debug("Adding %s to headers", json_header)
308
309
  headers.update(json_header)
309
310
 
@@ -610,7 +611,7 @@ class AmazonEchoApi:
610
611
  # Remove stale, orphaned and virtual devices
611
612
  if (
612
613
  NODE_DEVICES not in device
613
- or devices_node.get("deviceType") == AMAZON_DEVICE_TYPE
614
+ or devices_node.get("deviceType") in DEVICE_TO_IGNORE
614
615
  ):
615
616
  continue
616
617
 
aioamazondevices/const.py CHANGED
@@ -20,7 +20,6 @@ DOMAIN_BY_ISO3166_COUNTRY = {
20
20
  },
21
21
  "jp": {
22
22
  "domain": "co.jp",
23
- "openid.assoc_handle": "jpflex",
24
23
  },
25
24
  "br": {
26
25
  "domain": "com.br",
@@ -41,8 +40,9 @@ DEFAULT_HEADERS = {
41
40
  f"Mozilla/5.0 (iPhone; CPU iPhone OS {AMAZON_CLIENT_OS.replace('.', '_')} like Mac OS X) " # noqa: E501
42
41
  "AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"
43
42
  ),
44
- "Accept-Language": "en-US",
43
+ "Accept-Charset": "utf-8",
45
44
  "Accept-Encoding": "gzip",
45
+ "Accept-Language": "en-US",
46
46
  "Connection": "keep-alive",
47
47
  }
48
48
  CSRF_COOKIE = "csrf"
@@ -67,6 +67,11 @@ BIN_EXTENSION = ".bin"
67
67
 
68
68
  SPEAKER_GROUP_MODEL = "Speaker Group"
69
69
 
70
+ DEVICE_TO_IGNORE: list[str] = [
71
+ AMAZON_DEVICE_TYPE, # Alexa App for Mobile
72
+ "A1RTAM01W29CUP", # Alexa App for PC
73
+ ]
74
+
70
75
  DEVICE_TYPE_TO_MODEL: dict[str, dict[str, str | None]] = {
71
76
  "A10A33FOX2NUBK": {
72
77
  "model": "Echo Spot",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: aioamazondevices
3
- Version: 3.0.8
3
+ Version: 3.0.10
4
4
  Summary: Python library to control Amazon devices
5
5
  License: Apache-2.0
6
6
  Author: Simone Chemelli
@@ -0,0 +1,10 @@
1
+ aioamazondevices/__init__.py,sha256=Sx20malN92AJBq9P5MCjzVxISDHvKEgS-5sewNLe4NM,277
2
+ aioamazondevices/api.py,sha256=92bQze0rzIUONhCmj6nYuv8VBZSTrVWISIfLWSWEvFc,30735
3
+ aioamazondevices/const.py,sha256=wn-ZGYaxYLDQTWwTTSRvAd-hKiQBHKmwZ5B_Erf9eEs,4894
4
+ aioamazondevices/exceptions.py,sha256=nPbR928NryTbnxm5QwQpCSpRItvZ3PRYKynUUxH-_v4,1345
5
+ aioamazondevices/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ aioamazondevices/sounds.py,sha256=01pVCDFIuhrLypXInw4JNuHsC6zjMLsuKocet1R6we8,13409
7
+ aioamazondevices-3.0.10.dist-info/LICENSE,sha256=sS48k5sp9bFV-NSHDfAJuTZZ_-AP9ZDqUzQ9sffGlsg,11346
8
+ aioamazondevices-3.0.10.dist-info/METADATA,sha256=5MlZN_5Riosv2hemLhHht5gjK-KLAje63b4_XqZ1blw,5547
9
+ aioamazondevices-3.0.10.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
10
+ aioamazondevices-3.0.10.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- aioamazondevices/__init__.py,sha256=Rt3TflT34p0JCpQigmsHPwVXWVjxN4Si2A-ORUyL_SM,276
2
- aioamazondevices/api.py,sha256=ToqJFg_TdUHP8PKiytSN5jtbeGtes-dfcyzUZk5wn1Q,30700
3
- aioamazondevices/const.py,sha256=AHDQAcP7TIdGmAX-4m5OalyU-chiU6Eo3Ww2Hth15tE,4779
4
- aioamazondevices/exceptions.py,sha256=nPbR928NryTbnxm5QwQpCSpRItvZ3PRYKynUUxH-_v4,1345
5
- aioamazondevices/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- aioamazondevices/sounds.py,sha256=01pVCDFIuhrLypXInw4JNuHsC6zjMLsuKocet1R6we8,13409
7
- aioamazondevices-3.0.8.dist-info/LICENSE,sha256=sS48k5sp9bFV-NSHDfAJuTZZ_-AP9ZDqUzQ9sffGlsg,11346
8
- aioamazondevices-3.0.8.dist-info/METADATA,sha256=BSmxd6WLOpLBR8gbvK5fRo_hl5EcIQZOM0LP0cMIIFQ,5546
9
- aioamazondevices-3.0.8.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
10
- aioamazondevices-3.0.8.dist-info/RECORD,,