python-aidot 0.2.0__tar.gz → 0.2.2__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.
- {python_aidot-0.2.0/python_aidot.egg-info → python_aidot-0.2.2}/PKG-INFO +1 -1
- {python_aidot-0.2.0 → python_aidot-0.2.2}/aidot/login_const.py +6 -1
- {python_aidot-0.2.0 → python_aidot-0.2.2}/aidot/login_control.py +14 -4
- {python_aidot-0.2.0 → python_aidot-0.2.2/python_aidot.egg-info}/PKG-INFO +1 -1
- {python_aidot-0.2.0 → python_aidot-0.2.2}/setup.py +1 -1
- {python_aidot-0.2.0 → python_aidot-0.2.2}/LICENSE +0 -0
- {python_aidot-0.2.0 → python_aidot-0.2.2}/README.md +0 -0
- {python_aidot-0.2.0 → python_aidot-0.2.2}/aidot/__init__.py +0 -0
- {python_aidot-0.2.0 → python_aidot-0.2.2}/aidot/aes_utils.py +0 -0
- {python_aidot-0.2.0 → python_aidot-0.2.2}/aidot/discover.py +0 -0
- {python_aidot-0.2.0 → python_aidot-0.2.2}/aidot/lan.py +0 -0
- {python_aidot-0.2.0 → python_aidot-0.2.2}/aidot/login_data.py +0 -0
- {python_aidot-0.2.0 → python_aidot-0.2.2}/python_aidot.egg-info/SOURCES.txt +0 -0
- {python_aidot-0.2.0 → python_aidot-0.2.2}/python_aidot.egg-info/dependency_links.txt +0 -0
- {python_aidot-0.2.0 → python_aidot-0.2.2}/python_aidot.egg-info/requires.txt +0 -0
- {python_aidot-0.2.0 → python_aidot-0.2.2}/python_aidot.egg-info/top_level.txt +0 -0
- {python_aidot-0.2.0 → python_aidot-0.2.2}/setup.cfg +0 -0
|
@@ -176,4 +176,9 @@ SUPPORTED_COUNTRYS = [
|
|
|
176
176
|
{"_id": "23-0", "id": "YE", "name": "Yemen", "ext": "", "region": "JP"},
|
|
177
177
|
]
|
|
178
178
|
|
|
179
|
-
SUPPORTED_COUNTRY_NAMES = [item["name"] for item in SUPPORTED_COUNTRYS]
|
|
179
|
+
SUPPORTED_COUNTRY_NAMES = [item["name"] for item in SUPPORTED_COUNTRYS]
|
|
180
|
+
DEFAULT_COUNTRY_NAME = "United States"
|
|
181
|
+
CONF_LOGIN_RESPONSE = "login_response"
|
|
182
|
+
CONF_SELECTED_HOUSE = "selected_house"
|
|
183
|
+
CONF_DEVICE_LIST = "device_list"
|
|
184
|
+
CONF_PRODUCT_LIST = "product_list"
|
|
@@ -42,10 +42,20 @@ class LoginControl:
|
|
|
42
42
|
def __init__(self) -> None:
|
|
43
43
|
self.LoginData = LoginData()
|
|
44
44
|
self.region = "us"
|
|
45
|
+
self.username = ""
|
|
45
46
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
def get_identifier(self,house_id: str) -> str:
|
|
48
|
+
identifier = (
|
|
49
|
+
"username:"
|
|
50
|
+
+ self.username
|
|
51
|
+
+ ","
|
|
52
|
+
+ "house_id:"
|
|
53
|
+
+ house_id
|
|
54
|
+
+ ","
|
|
55
|
+
+ "region:"
|
|
56
|
+
+ self.region
|
|
57
|
+
)
|
|
58
|
+
return identifier
|
|
49
59
|
|
|
50
60
|
def change_country_code(self, selected_contry_obj: str):
|
|
51
61
|
"""Do change_country_code."""
|
|
@@ -130,7 +140,7 @@ class LoginControl:
|
|
|
130
140
|
|
|
131
141
|
async def async_post_login(self, hass: HomeAssistant, username: str, password: str):
|
|
132
142
|
"""Login the user input allows us to connect."""
|
|
133
|
-
|
|
143
|
+
self.username = username
|
|
134
144
|
url = f"{self.LoginData.baseUrl}/users/loginWithFreeVerification"
|
|
135
145
|
headers = {"Appid": APP_ID, "Terminal": "app"}
|
|
136
146
|
data = {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|