|
@@ -113,12 +113,16 @@ class ZLockCoordinator(DataUpdateCoordinator[dict[str, LockState]]):
|
|
|
_LOGGER.exception("Failed to fetch code slots for %s", lock_entity_id)
|
|
_LOGGER.exception("Failed to fetch code slots for %s", lock_entity_id)
|
|
|
return {}
|
|
return {}
|
|
|
|
|
|
|
|
|
|
+ if users:
|
|
|
|
|
+ _LOGGER.debug("UserData[0]: %s", vars(users[0]) if hasattr(users[0], "__dict__") else users[0])
|
|
|
|
|
+
|
|
|
slots: dict[int, SlotInfo] = {}
|
|
slots: dict[int, SlotInfo] = {}
|
|
|
for user in users:
|
|
for user in users:
|
|
|
slot_num = user.user_id
|
|
slot_num = user.user_id
|
|
|
if slot_num == 0:
|
|
if slot_num == 0:
|
|
|
continue
|
|
continue
|
|
|
- status_name = user.status.name if hasattr(user.status, "name") else str(user.status)
|
|
|
|
|
|
|
+ status = user.user_id_status
|
|
|
|
|
+ status_name = status.name if hasattr(status, "name") else str(status)
|
|
|
if status_name == "Available":
|
|
if status_name == "Available":
|
|
|
continue
|
|
continue
|
|
|
slots[slot_num] = SlotInfo(
|
|
slots[slot_num] = SlotInfo(
|