Skip to content

Commit

Permalink
Merge pull request #90 from kvj/fix_ring_suppr
Browse files Browse the repository at this point in the history
Fix device discovery using Web API
  • Loading branch information
kvj authored Aug 26, 2022
2 parents eda3336 + 5cf1306 commit 361ce9d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/nuki_ng/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ async def find_nuki_devices(self, config: dict):
response = await nuki.web_list()
_LOGGER.debug(f"web devices: {response}")
if not title:
title = response[0]["name"]
first_device = next(iter(response.values()), {})
title = first_device.get("name")
except Exception as err:
_LOGGER.exception(
f"Failed to get list of devices from web API: {err}")
Expand Down

0 comments on commit 361ce9d

Please sign in to comment.