diff --git a/bluepy/btle.py b/bluepy/btle.py index 023a0f22..e6569d70 100755 --- a/bluepy/btle.py +++ b/bluepy/btle.py @@ -405,10 +405,7 @@ def __init__(self, deviceAddr=None, addrType=ADDR_TYPE_PUBLIC, iface=None): self._serviceMap = None # Indexed by UUID (self.deviceAddr, self.addrType, self.iface) = (None, None, None) - if isinstance(deviceAddr, ScanEntry): - self._connect(deviceAddr.addr, deviceAddr.addrType, deviceAddr.iface) - elif deviceAddr is not None: - self._connect(deviceAddr, addrType, iface) + self.connect(deviceAddr, addrType=addrType, iface=iface) def setDelegate(self, delegate_): # same as withDelegate(), deprecated return self.withDelegate(delegate_)