We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43b20eb commit 410ba42Copy full SHA for 410ba42
1 file changed
custom_components/xiaomi_cloud_map_extractor/common/xiaomi_cloud_connector.py
@@ -290,8 +290,13 @@ def generate_nonce(millis: int):
290
291
@staticmethod
292
def generate_agent() -> str:
293
- agent_id = "".join((chr(random.randint(65, 69)) for _ in range(13)))
294
- return f"Android-7.1.1-1.0.0-ONEPLUS A3010-136-{agent_id} APP/xiaomi.smarthome APPV/62830"
+ agent_id = "".join(
+ map(lambda i: chr(i), [random.randint(65, 69) for _ in range(13)])
295
+ )
296
+ a = random.randint(0, 9)
297
+ b = random.randint(0, 9)
298
+ c = random.randint(0, 9)
299
+ return f"Android-7.1.1-{a}.{b}.{c}-ONEPLUS A3011-136-{agent_id} APP/xiaomi.smarthome APPV/62830"
300
301
302
def generate_device_id() -> str:
0 commit comments