aioamazondevices 3.3.1__py3-none-any.whl → 3.4.0__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.3.1"
3
+ __version__ = "3.4.0"
4
4
 
5
5
 
6
6
  from .api import AmazonDevice, AmazonEchoApi
aioamazondevices/api.py CHANGED
@@ -152,14 +152,9 @@ class AmazonEchoApi:
152
152
  self._devices: dict[str, Any] = {}
153
153
  self._sensors_available: bool = True
154
154
 
155
- if locale and (lang := locale.get("language")):
156
- language = lang
157
- else:
158
- lang_object = Language.make(territory=self._login_country_code.upper())
159
- lang_maximized = lang_object.maximize()
160
- language = f"{lang_maximized.language}-{lang_maximized.region}"
161
-
162
- self._language = language
155
+ lang_object = Language.make(territory=self._login_country_code.upper())
156
+ lang_maximized = lang_object.maximize()
157
+ self._language = f"{lang_maximized.language}-{lang_maximized.region}"
163
158
 
164
159
  _LOGGER.debug(
165
160
  "Initialize library with domain <%s> and language <%s>",
@@ -907,7 +902,7 @@ class AmazonEchoApi:
907
902
  )
908
903
  if not model_details:
909
904
  _LOGGER.warning(
910
- "Unknown device type '%s' for %s: please read https://github.com/chemelli74/aioamazondevices?tab=readme-ov-file#unknown-device-type",
905
+ "Unknown device type '%s' for %s: please read https://github.com/chemelli74/aioamazondevices/wiki/Unknown-Device-Types",
911
906
  device.device_type,
912
907
  device.account_name,
913
908
  )
aioamazondevices/const.py CHANGED
@@ -30,16 +30,18 @@ TO_REDACT = {
30
30
  "user_id",
31
31
  }
32
32
 
33
+ AMAZON_DE_OVERRIDE = {
34
+ "domain": "de",
35
+ "openid.assoc_handle": f"{DEFAULT_ASSOC_HANDLE}_de",
36
+ }
37
+ AMAZON_US_OVERRIDE = {
38
+ "domain": "com",
39
+ "openid.assoc_handle": DEFAULT_ASSOC_HANDLE,
40
+ }
41
+
33
42
  DOMAIN_BY_ISO3166_COUNTRY = {
34
- "ar": {
35
- "domain": "com",
36
- "openid.assoc_handle": DEFAULT_ASSOC_HANDLE,
37
- },
38
- "at": {
39
- "domain": "de",
40
- "language": "en-US",
41
- "openid.assoc_handle": f"{DEFAULT_ASSOC_HANDLE}_de",
42
- },
43
+ "ar": AMAZON_US_OVERRIDE,
44
+ "at": AMAZON_DE_OVERRIDE,
43
45
  "au": {
44
46
  "domain": "com.au",
45
47
  "openid.assoc_handle": f"{DEFAULT_ASSOC_HANDLE}_au",
@@ -54,16 +56,14 @@ DOMAIN_BY_ISO3166_COUNTRY = {
54
56
  "domain": "co.uk",
55
57
  "openid.assoc_handle": f"{DEFAULT_ASSOC_HANDLE}_uk",
56
58
  },
57
- "il": {
58
- "domain": "com",
59
- "openid.assoc_handle": DEFAULT_ASSOC_HANDLE,
60
- },
59
+ "il": AMAZON_US_OVERRIDE,
61
60
  "jp": {
62
61
  "domain": "co.jp",
63
62
  },
64
63
  "mx": {
65
64
  "domain": "com.mx",
66
65
  },
66
+ "no": AMAZON_DE_OVERRIDE,
67
67
  "nz": {
68
68
  "domain": "com.au",
69
69
  "openid.assoc_handle": f"{DEFAULT_ASSOC_HANDLE}_au",
@@ -71,9 +71,9 @@ DOMAIN_BY_ISO3166_COUNTRY = {
71
71
  "tr": {
72
72
  "domain": "com.tr",
73
73
  },
74
- "us": {
75
- "domain": "com",
76
- "openid.assoc_handle": DEFAULT_ASSOC_HANDLE,
74
+ "us": AMAZON_US_OVERRIDE,
75
+ "za": {
76
+ "domain": "co.za",
77
77
  },
78
78
  }
79
79
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: aioamazondevices
3
- Version: 3.3.1
3
+ Version: 3.4.0
4
4
  Summary: Python library to control Amazon devices
5
5
  License: Apache-2.0
6
6
  Author: Simone Chemelli
@@ -85,30 +85,73 @@ The script accept command line arguments or a library_test.json config file:
85
85
  }
86
86
  ```
87
87
 
88
- ## Unknown device type
88
+ ## Known Issues & Limitations
89
+
90
+ See [wiki](https://github.com/chemelli74/aioamazondevices/wiki/Known-Issues-and-Limitations)
89
91
 
90
- Library logs a warning if an unknown device type is linked to your Amazon account.
92
+ ## Unknown device type
91
93
 
92
- Please open an issue [here](https://github.com/chemelli74/aioamazondevices/issues) and provide the following information:
94
+ See [wiki](https://github.com/chemelli74/aioamazondevices/wiki/Unknown-Device-Types)
93
95
 
94
- - device type
95
- - brand
96
- - model
97
- - generation
98
- - entities are available in Home Assistant
99
- - entities work in Home Assistant
96
+ ## Roadmap
100
97
 
101
- Current device list: `DEVICE_TYPE_TO_MODEL` from [const.py](https://github.com/chemelli74/aioamazondevices/blob/main/src/aioamazondevices/const.py)
98
+ See [wiki](https://github.com/chemelli74/aioamazondevices/wiki/Roadmap)
102
99
 
103
100
  ## Contributors ✨
104
101
 
105
102
  Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
106
103
 
107
104
  <!-- prettier-ignore-start -->
108
- <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
109
- <!-- markdownlint-disable -->
110
- <!-- markdownlint-enable -->
111
- <!-- ALL-CONTRIBUTORS-LIST:END -->
105
+ <!-- readme: contributors -start -->
106
+ <table>
107
+ <tbody>
108
+ <tr>
109
+ <td align="center">
110
+ <a href="https://github.com/chemelli74">
111
+ <img src="https://avatars.githubusercontent.com/u/57354320?v=4" width="100;" alt="chemelli74"/>
112
+ <br />
113
+ <sub><b>Simone Chemelli</b></sub>
114
+ </a>
115
+ </td>
116
+ <td align="center">
117
+ <a href="https://github.com/jeeftor">
118
+ <img src="https://avatars.githubusercontent.com/u/6491743?v=4" width="100;" alt="jeeftor"/>
119
+ <br />
120
+ <sub><b>Jeef</b></sub>
121
+ </a>
122
+ </td>
123
+ <td align="center">
124
+ <a href="https://github.com/jamesonuk">
125
+ <img src="https://avatars.githubusercontent.com/u/1040621?v=4" width="100;" alt="jamesonuk"/>
126
+ <br />
127
+ <sub><b>jameson_uk</b></sub>
128
+ </a>
129
+ </td>
130
+ <td align="center">
131
+ <a href="https://github.com/ivanfmartinez">
132
+ <img src="https://avatars.githubusercontent.com/u/677001?v=4" width="100;" alt="ivanfmartinez"/>
133
+ <br />
134
+ <sub><b>Ivan F. Martinez</b></sub>
135
+ </a>
136
+ </td>
137
+ <td align="center">
138
+ <a href="https://github.com/lchavezcuu">
139
+ <img src="https://avatars.githubusercontent.com/u/22165856?v=4" width="100;" alt="lchavezcuu"/>
140
+ <br />
141
+ <sub><b>Luis Chavez</b></sub>
142
+ </a>
143
+ </td>
144
+ <td align="center">
145
+ <a href="https://github.com/tronikos">
146
+ <img src="https://avatars.githubusercontent.com/u/9987465?v=4" width="100;" alt="tronikos"/>
147
+ <br />
148
+ <sub><b>tronikos</b></sub>
149
+ </a>
150
+ </td>
151
+ </tr>
152
+ <tbody>
153
+ </table>
154
+ <!-- readme: contributors -end -->
112
155
  <!-- prettier-ignore-end -->
113
156
 
114
157
  This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
@@ -0,0 +1,11 @@
1
+ aioamazondevices/__init__.py,sha256=fd2mZWF9xVsM18tJqrX5LEGz06hXrnlPjWauYq6xMwA,276
2
+ aioamazondevices/api.py,sha256=SBucwyavOv8aiXyw3iorZUA0qgA2cavCIzfdRanrbSQ,39733
3
+ aioamazondevices/const.py,sha256=qeaGMLGKH4r-84EjBvMzj1BcwgRRcDD551TUsUu4AiI,9029
4
+ aioamazondevices/exceptions.py,sha256=CfOFKDvE_yl5BFoFcpTOuDfgRi_2oAtKk-nNJgfWBAs,726
5
+ aioamazondevices/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ aioamazondevices/sounds.py,sha256=01pVCDFIuhrLypXInw4JNuHsC6zjMLsuKocet1R6we8,13409
7
+ aioamazondevices/utils.py,sha256=RzuKRhnq_8ymCoJMoQJ2vBYyuew06RSWpqQWmqdNczE,2019
8
+ aioamazondevices-3.4.0.dist-info/LICENSE,sha256=sS48k5sp9bFV-NSHDfAJuTZZ_-AP9ZDqUzQ9sffGlsg,11346
9
+ aioamazondevices-3.4.0.dist-info/METADATA,sha256=c61BBAOhX4xnSIsl2kMwqIQFbqo6abWYePtU0kCeZ1c,6929
10
+ aioamazondevices-3.4.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
11
+ aioamazondevices-3.4.0.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- aioamazondevices/__init__.py,sha256=Dgok2Xxu-FJDmSIfY-mQcaI6Xe1dCMQXfyyXYUVu4-c,276
2
- aioamazondevices/api.py,sha256=4r1VMWkuk8GCVtrHlNq8Wvscl_ThscglHjuZyHgOm9U,39885
3
- aioamazondevices/const.py,sha256=NVqS6TKQGlJJoViG9Mw9_dsKKyDL7v61OHHyjjkCqeY,9059
4
- aioamazondevices/exceptions.py,sha256=CfOFKDvE_yl5BFoFcpTOuDfgRi_2oAtKk-nNJgfWBAs,726
5
- aioamazondevices/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- aioamazondevices/sounds.py,sha256=01pVCDFIuhrLypXInw4JNuHsC6zjMLsuKocet1R6we8,13409
7
- aioamazondevices/utils.py,sha256=RzuKRhnq_8ymCoJMoQJ2vBYyuew06RSWpqQWmqdNczE,2019
8
- aioamazondevices-3.3.1.dist-info/LICENSE,sha256=sS48k5sp9bFV-NSHDfAJuTZZ_-AP9ZDqUzQ9sffGlsg,11346
9
- aioamazondevices-3.3.1.dist-info/METADATA,sha256=hOfbN_9Bb0dMcvlOhsiwUAcbxxMa_MkMmGC_GGIF9bM,5245
10
- aioamazondevices-3.3.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
11
- aioamazondevices-3.3.1.dist-info/RECORD,,