Skip to content

Commit 9d81243

Browse files
authored
Add missing deviceID to API requests. (#17)
The API recently started requiring this. Close #16, and close mac-zhou/midea-ac-py#217
1 parent e5b44b1 commit 9d81243

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

msmart/cloud.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class cloud:
2424
LANGUAGE = 'en_US'
2525
APP_ID = "1010"
2626
SRC = "1010"
27+
DEVICE_ID = "c1acad8939ac0d7d"
2728

2829
def __init__(self, email, password, use_china_server=False):
2930
# Get this from any of the Midea based apps, you can find one on Yitsushi's github page
@@ -76,6 +77,7 @@ def api_request(self, endpoint, args=None, data=None):
7677
'language': self.LANGUAGE,
7778
'src': self.SRC,
7879
'stamp': datetime.now().strftime("%Y%m%d%H%M%S"),
80+
'deviceId': self.DEVICE_ID,
7981
}
8082
# Add the method parameters for the endpoint
8183
data.update(args)

0 commit comments

Comments
 (0)