Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion switchbot/devices/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,10 @@ async def _lock_unlock(
# Also update the battery and firmware version
if basic_data := await self._get_basic_info():
self._last_full_update = time.monotonic()
self._update_parsed_data(self._parse_basic_data(basic_data))
if len(basic_data) >= 3:
self._update_parsed_data(self._parse_basic_data(basic_data))
else:
_LOGGER.warning("Invalid basic data received: %s", basic_data)
self._fire_callbacks()

return status
Expand Down