Skip to content

Commit

Permalink
Merge pull request #99 from kvj/feat_web_ids
Browse files Browse the repository at this point in the history
Do not covert IDs in web API-only mode
  • Loading branch information
kvj authored Aug 31, 2022
2 parents c986a68 + 844de6b commit 10001e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions custom_components/nuki_ng/nuki.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 10001e6

Please sign in to comment.