Switch frequently used unifi controller properties to attributes (#45365)
This commit is contained in:
parent
243014bff1
commit
536e835b39
5 changed files with 61 additions and 86 deletions
|
@ -12,11 +12,7 @@ class UniFiClient(UniFiBase):
|
|||
super().__init__(client, controller)
|
||||
|
||||
self._is_wired = client.mac not in controller.wireless_clients
|
||||
|
||||
@property
|
||||
def client(self):
|
||||
"""Wrap item."""
|
||||
return self._item
|
||||
self.client = self._item
|
||||
|
||||
@property
|
||||
def is_wired(self):
|
||||
|
@ -29,6 +25,7 @@ class UniFiClient(UniFiBase):
|
|||
|
||||
if self.controller.option_ignore_wired_bug:
|
||||
return self.client.is_wired
|
||||
|
||||
return self._is_wired
|
||||
|
||||
@property
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue