From 844de6b71299ef9e0a1bc95cafa68c4761c48ef3 Mon Sep 17 00:00:00 2001 From: Konstantin Vorobyev Date: Wed, 31 Aug 2022 14:17:01 +0200 Subject: [PATCH] Do not covert IDs in web API-only mode --- custom_components/nuki_ng/nuki.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/custom_components/nuki_ng/nuki.py b/custom_components/nuki_ng/nuki.py index 00c791e..a4757b2 100644 --- a/custom_components/nuki_ng/nuki.py +++ b/custom_components/nuki_ng/nuki.py @@ -276,6 +276,7 @@ async def web_list(self): result[item.get("smartlockId")] = { "deviceType": item.get("type"), "nukiId": item.get("smartlockId"), + "web": True, "name": item.get("name"), "firmwareVersion": str(item.get("firmwareVersion")), "config": item.get("config"), @@ -374,6 +375,8 @@ async def _update(self): device_list = None web_list = None def web_id_for_item(item): + if item.get("web"): + return item["nukiId"] # Already in web mode as_hex = "{0:x}".format(item["nukiId"]) deviceType = item.get("deviceType", 0) if deviceType == 2: