Skip to content

Commit a7804fc

Browse files
committed
add login info to get_info
1 parent b5eec95 commit a7804fc

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

bin/get_info.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ async def main():
4949
dayTime = time.strftime("%Y-%m-%d")
5050

5151
functions = {
52+
"info": None,
5253
"api-energy/electric/getFhpElectricData": {"type": 1, "dayTime": dayTime},
5354
"hes-gateway/common/getAccessoryList": None,
5455
"hes-gateway/common/getPageByTypeList": {
@@ -67,7 +68,6 @@ async def main():
6768
"hes-gateway/terminal/getDeviceCompositeInfo": {"refreshFlag": 0},
6869
"hes-gateway/terminal/getDeviceInfoV2": None,
6970
"hes-gateway/terminal/getGatewaySystemSetting": None,
70-
"hes-gateway/terminal/getHomeGatewayList": None,
7171
"hes-gateway/terminal/getHotSpotInfo/v2": None,
7272
"hes-gateway/terminal/getPersonalInfo": None,
7373
"hes-gateway/terminal/getShowTip": {"type": 1},
@@ -114,7 +114,9 @@ async def main():
114114
"get_stats": None,
115115
}
116116

117-
async def get(func: str) -> None:
117+
async def get(func: str):
118+
if func == "info":
119+
return fetcher.info
118120
if func.endswith("/getGatewayTouListV2"):
119121
return (await client._post(client.url_base + func, None, functions[func]))["result"] # noqa: SLF001
120122
if func.startswith(("api-energy", "hes-gateway")):

0 commit comments

Comments
 (0)