File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ def connect(self, hub_mac=None):
100
100
for dev in devices :
101
101
address = dev .mac_address
102
102
name = dev .alias ()
103
- if name == LEGO_MOVE_HUB or hub_mac == address :
103
+ if ( not hub_mac and name == LEGO_MOVE_HUB ) or hub_mac == address :
104
104
logging .info ("Found %s at %s" , name , address )
105
105
self ._device = CustomDevice (address , self ._manager )
106
106
break
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ def connect(self, hub_mac=None):
70
70
log .debug ("Devices: %s" , devices )
71
71
72
72
for address , name in devices .items ():
73
- if name == LEGO_MOVE_HUB or hub_mac == address :
73
+ if ( not hub_mac and name == LEGO_MOVE_HUB ) or hub_mac == address :
74
74
logging .info ("Found %s at %s" , name , address )
75
75
self .requester = Requester (address , True , self ._iface )
76
76
break
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def connect(self, hub_mac=None):
34
34
for dev in devices :
35
35
address = dev ['address' ]
36
36
name = dev ['name' ]
37
- if name == LEGO_MOVE_HUB or hub_mac == address :
37
+ if ( not hub_mac and name == LEGO_MOVE_HUB ) or hub_mac == address :
38
38
logging .info ("Found %s at %s" , name , address )
39
39
self ._conn_hnd = adapter .connect (address )
40
40
break
You can’t perform that action at this time.
0 commit comments