diff --git a/lib/logitech_receiver/device.py b/lib/logitech_receiver/device.py index 4e8c23fa..c7c03261 100644 --- a/lib/logitech_receiver/device.py +++ b/lib/logitech_receiver/device.py @@ -397,9 +397,8 @@ class Device: def ping(self): """Checks if the device is online, returns True of False""" - protocol = _base.ping( - self.handle or self.receiver.handle, self.number, long_message=self.bluetooth or self._protocol >= 2.0 - ) + long = self.bluetooth or self._protocol is not None and self._protocol >= 2.0 + protocol = _base.ping(self.handle or self.receiver.handle, self.number, long_message=long) self.online = protocol is not None if protocol: self._protocol = protocol