Skip to content

Commit 2c98806

Browse files
authored
fix: report rssi when device is on the edge of range (#87)
1 parent a79797a commit 2c98806

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

switchbot/devices/device.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,9 @@ async def _sendcommand(self, key: str, retry: int | None = None) -> bytes:
127127
return await self._send_command_locked(key, command)
128128
except BleakNotFoundError:
129129
_LOGGER.error(
130-
"%s: device not found or no longer in range; Try restarting Bluetooth",
130+
"%s: device not found, no longer in range, or poor RSSI: %s",
131131
self.name,
132+
self.rssi,
132133
exc_info=True,
133134
)
134135
return b"\x00"

0 commit comments

Comments
 (0)