home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.64k stars 30.4k forks source link

Nuki Error with second Bridge #51292

Closed sasch901 closed 3 years ago

sasch901 commented 3 years ago

The problem

We have 2 Nuki Bridges. The First one is working as its Best. The second one worked one day in Home Assistant. But now it showing Errors.

What I've done:

image

What is version of Home Assistant Core has the issue?

core-2021.5.5

What was the last working version of Home Assistant Core?

core-2021.5.5

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Nuki

Link to integration documentation on our website

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.config_entries
Source: components/nuki/__init__.py:38
First occurred: 13:17:34 (2 occurrences)
Last logged: 13:42:05

Error setting up entry 461847922 for nuki
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 269, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/nuki/__init__.py", line 94, in async_setup_entry
    locks, openers = await hass.async_add_executor_job(_get_bridge_devices, bridge)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/nuki/__init__.py", line 38, in _get_bridge_devices
    return bridge.locks, bridge.openers
  File "/usr/local/lib/python3.8/site-packages/pynuki/bridge.py", line 234, in locks
    return self._get_devices(device_type=const.DEVICE_TYPE_LOCK)
  File "/usr/local/lib/python3.8/site-packages/pynuki/bridge.py", line 209, in _get_devices
    for k, v in l["lastKnownState"].items()
KeyError: 'lastKnownState'

Additional information

No response

github-actions[bot] commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

buschtoens commented 3 years ago

If you are still running into this issue, you may have a malconfigured or unreachable device. Check this comment: https://github.com/home-assistant/core/issues/54460#issuecomment-933967993