UniFi lies about the client being noted, using the real note instead if it exists (#53542)
This commit is contained in:
parent
348d7a5622
commit
93899e981f
1 changed files with 4 additions and 6 deletions
|
@ -38,7 +38,7 @@ CLIENT_CONNECTED_ATTRIBUTES = [
|
|||
"ip",
|
||||
"is_11r",
|
||||
"is_guest",
|
||||
"noted",
|
||||
"note",
|
||||
"qos_policy_applied",
|
||||
"radio",
|
||||
"radio_proto",
|
||||
|
@ -258,13 +258,11 @@ class UniFiClientTracker(UniFiClient, ScannerEntity):
|
|||
"""Return the client state attributes."""
|
||||
raw = self.client.raw
|
||||
|
||||
attributes_to_check = CLIENT_STATIC_ATTRIBUTES
|
||||
if self.is_connected:
|
||||
attributes = {
|
||||
k: raw[k] for k in CLIENT_CONNECTED_ALL_ATTRIBUTES if k in raw
|
||||
}
|
||||
else:
|
||||
attributes = {k: raw[k] for k in CLIENT_STATIC_ATTRIBUTES if k in raw}
|
||||
attributes_to_check = CLIENT_CONNECTED_ALL_ATTRIBUTES
|
||||
|
||||
attributes = {k: raw[k] for k in attributes_to_check if k in raw}
|
||||
attributes["is_wired"] = self.is_wired
|
||||
|
||||
return attributes
|
||||
|
|
Loading…
Add table
Reference in a new issue