Separate august keypads into their own device (#33665)
The keypad has its own unique id so its better represented as its own device. This fixes showing the keypad battery state for the lock in the UI.
This commit is contained in:
1 parent
b09b5729a3
commit
7dd42bc32d
3 files changed
+79
-61
No files matched your search
@@ -262,6 +262,13 @@ class AugustData(AugustSubscriberMixin):
|
||||
await self._async_update_device_detail(
|
||||
self._locks_by_id[device_id], self._api.async_get_lock_detail
|
||||
)
|
||||
# keypads are always attached to locks
|
||||
if (
|
||||
device_id in self._device_detail_by_id
|
||||
and self._device_detail_by_id[device_id].keypad is not None
|
||||
):
|
||||
keypad = self._device_detail_by_id[device_id].keypad
|
||||
self._device_detail_by_id[keypad.device_id] = keypad
|
||||
elif device_id in self._doorbells_by_id:
|
||||
await self._async_update_device_detail(
|
||||
self._doorbells_by_id[device_id],
|
||||
|
||||
Reference in new issue
Block a user