We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2f610a commit 7caa46dCopy full SHA for 7caa46d
switchbot/devices/lock.py
@@ -193,7 +193,10 @@ async def _lock_unlock(
193
# Also update the battery and firmware version
194
if basic_data := await self._get_basic_info():
195
self._last_full_update = time.monotonic()
196
- self._update_parsed_data(self._parse_basic_data(basic_data))
+ if len(basic_data) >= 3:
197
+ self._update_parsed_data(self._parse_basic_data(basic_data))
198
+ else:
199
+ _LOGGER.warning("Invalid basic data received: %s", basic_data)
200
self._fire_callbacks()
201
202
return status
0 commit comments