Remove temporary variable by only retrieving needed value (#42522)
This commit is contained in:
@@ -345,9 +345,9 @@ class UniFiController:
|
||||
|
||||
mac = ""
|
||||
if entity.domain == TRACKER_DOMAIN:
|
||||
mac, _ = entity.unique_id.split("-", 1)
|
||||
mac = entity.unique_id.split("-", 1)[0]
|
||||
elif entity.domain == SWITCH_DOMAIN:
|
||||
_, mac = entity.unique_id.split("-", 1)
|
||||
mac = entity.unique_id.split("-", 1)[1]
|
||||
|
||||
if mac in self.api.clients or mac not in self.api.clients_all:
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user