aioamazondevices 3.3.1__tar.gz → 3.4.0__tar.gz

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
  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!
@@ -62,30 +62,73 @@ The script accept command line arguments or a library_test.json config file:
62
62
  }
63
63
  ```
64
64
 
65
- ## Unknown device type
65
+ ## Known Issues & Limitations
66
+
67
+ See [wiki](https://github.com/chemelli74/aioamazondevices/wiki/Known-Issues-and-Limitations)
66
68
 
67
- Library logs a warning if an unknown device type is linked to your Amazon account.
69
+ ## Unknown device type
68
70
 
69
- Please open an issue [here](https://github.com/chemelli74/aioamazondevices/issues) and provide the following information:
71
+ See [wiki](https://github.com/chemelli74/aioamazondevices/wiki/Unknown-Device-Types)
70
72
 
71
- - device type
72
- - brand
73
- - model
74
- - generation
75
- - entities are available in Home Assistant
76
- - entities work in Home Assistant
73
+ ## Roadmap
77
74
 
78
- Current device list: `DEVICE_TYPE_TO_MODEL` from [const.py](https://github.com/chemelli74/aioamazondevices/blob/main/src/aioamazondevices/const.py)
75
+ See [wiki](https://github.com/chemelli74/aioamazondevices/wiki/Roadmap)
79
76
 
80
77
  ## Contributors ✨
81
78
 
82
79
  Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
83
80
 
84
81
  <!-- prettier-ignore-start -->
85
- <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
86
- <!-- markdownlint-disable -->
87
- <!-- markdownlint-enable -->
88
- <!-- ALL-CONTRIBUTORS-LIST:END -->
82
+ <!-- readme: contributors -start -->
83
+ <table>
84
+ <tbody>
85
+ <tr>
86
+ <td align="center">
87
+ <a href="https://github.com/chemelli74">
88
+ <img src="https://avatars.githubusercontent.com/u/57354320?v=4" width="100;" alt="chemelli74"/>
89
+ <br />
90
+ <sub><b>Simone Chemelli</b></sub>
91
+ </a>
92
+ </td>
93
+ <td align="center">
94
+ <a href="https://github.com/jeeftor">
95
+ <img src="https://avatars.githubusercontent.com/u/6491743?v=4" width="100;" alt="jeeftor"/>
96
+ <br />
97
+ <sub><b>Jeef</b></sub>
98
+ </a>
99
+ </td>
100
+ <td align="center">
101
+ <a href="https://github.com/jamesonuk">
102
+ <img src="https://avatars.githubusercontent.com/u/1040621?v=4" width="100;" alt="jamesonuk"/>
103
+ <br />
104
+ <sub><b>jameson_uk</b></sub>
105
+ </a>
106
+ </td>
107
+ <td align="center">
108
+ <a href="https://github.com/ivanfmartinez">
109
+ <img src="https://avatars.githubusercontent.com/u/677001?v=4" width="100;" alt="ivanfmartinez"/>
110
+ <br />
111
+ <sub><b>Ivan F. Martinez</b></sub>
112
+ </a>
113
+ </td>
114
+ <td align="center">
115
+ <a href="https://github.com/lchavezcuu">
116
+ <img src="https://avatars.githubusercontent.com/u/22165856?v=4" width="100;" alt="lchavezcuu"/>
117
+ <br />
118
+ <sub><b>Luis Chavez</b></sub>
119
+ </a>
120
+ </td>
121
+ <td align="center">
122
+ <a href="https://github.com/tronikos">
123
+ <img src="https://avatars.githubusercontent.com/u/9987465?v=4" width="100;" alt="tronikos"/>
124
+ <br />
125
+ <sub><b>tronikos</b></sub>
126
+ </a>
127
+ </td>
128
+ </tr>
129
+ <tbody>
130
+ </table>
131
+ <!-- readme: contributors -end -->
89
132
  <!-- prettier-ignore-end -->
90
133
 
91
134
  This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "aioamazondevices"
3
- version = "3.3.1"
3
+ version = "3.4.0"
4
4
  requires-python = ">=3.12"
5
5
  description = "Python library to control Amazon devices"
6
6
  authors = [
@@ -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
@@ -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
  )
@@ -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