Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.unifi.device_tracker Namespace Reference

Classes

class  UnifiScannerEntity
 
class  UnifiTrackerEntityDescription
 

Functions

bool async_client_allowed_fn (UnifiHub hub, str obj_id)
 
bool async_client_is_connected_fn (UnifiHub hub, str obj_id)
 
timedelta async_device_heartbeat_timedelta_fn (UnifiHub hub, str obj_id)
 
None async_setup_entry (HomeAssistant hass, UnifiConfigEntry config_entry, AddEntitiesCallback async_add_entities)
 
None async_update_unique_id (HomeAssistant hass, UnifiConfigEntry config_entry)
 

Variables

list CLIENT_CONNECTED_ALL_ATTRIBUTES = CLIENT_CONNECTED_ATTRIBUTES + CLIENT_STATIC_ATTRIBUTES
 
list CLIENT_CONNECTED_ATTRIBUTES
 
list CLIENT_STATIC_ATTRIBUTES
 
string CLIENT_TRACKER = "client"
 
string DEVICE_TRACKER = "device"
 
 LOGGER = logging.getLogger(__name__)
 
tuple WIRED_CONNECTION = (EventKey.WIRED_CLIENT_CONNECTED,)
 
tuple WIRED_DISCONNECTION = (EventKey.WIRED_CLIENT_DISCONNECTED,)
 
tuple WIRELESS_CONNECTION
 
tuple WIRELESS_DISCONNECTION
 

Detailed Description

Track both clients and devices using UniFi Network.

Function Documentation

◆ async_client_allowed_fn()

bool homeassistant.components.unifi.device_tracker.async_client_allowed_fn ( UnifiHub  hub,
str  obj_id 
)
Check if client is allowed.

Definition at line 88 of file device_tracker.py.

◆ async_client_is_connected_fn()

bool homeassistant.components.unifi.device_tracker.async_client_is_connected_fn ( UnifiHub  hub,
str  obj_id 
)
Check if device object is disabled.

Definition at line 112 of file device_tracker.py.

◆ async_device_heartbeat_timedelta_fn()

timedelta homeassistant.components.unifi.device_tracker.async_device_heartbeat_timedelta_fn ( UnifiHub  hub,
str  obj_id 
)
Check if device object is disabled.

Definition at line 138 of file device_tracker.py.

◆ async_setup_entry()

None homeassistant.components.unifi.device_tracker.async_setup_entry ( HomeAssistant  hass,
UnifiConfigEntry  config_entry,
AddEntitiesCallback  async_add_entities 
)
Set up device tracker for UniFi Network integration.

Definition at line 222 of file device_tracker.py.

◆ async_update_unique_id()

None homeassistant.components.unifi.device_tracker.async_update_unique_id ( HomeAssistant  hass,
UnifiConfigEntry  config_entry 
)
Normalize client unique ID to have a prefix rather than suffix.

Introduced with release 2023.12.

Definition at line 195 of file device_tracker.py.

Variable Documentation

◆ CLIENT_CONNECTED_ALL_ATTRIBUTES

list homeassistant.components.unifi.device_tracker.CLIENT_CONNECTED_ALL_ATTRIBUTES = CLIENT_CONNECTED_ATTRIBUTES + CLIENT_STATIC_ATTRIBUTES

Definition at line 69 of file device_tracker.py.

◆ CLIENT_CONNECTED_ATTRIBUTES

list homeassistant.components.unifi.device_tracker.CLIENT_CONNECTED_ATTRIBUTES
Initial value:
1 = [
2  "_is_guest_by_uap",
3  "ap_mac",
4  "authorized",
5  "essid",
6  "ip",
7  "is_11r",
8  "is_guest",
9  "note",
10  "qos_policy_applied",
11  "radio",
12  "radio_proto",
13  "vlan",
14 ]

Definition at line 47 of file device_tracker.py.

◆ CLIENT_STATIC_ATTRIBUTES

list homeassistant.components.unifi.device_tracker.CLIENT_STATIC_ATTRIBUTES
Initial value:
1 = [
2  "mac",
3  "name",
4  "oui",
5 ]

Definition at line 62 of file device_tracker.py.

◆ CLIENT_TRACKER

string homeassistant.components.unifi.device_tracker.CLIENT_TRACKER = "client"

Definition at line 44 of file device_tracker.py.

◆ DEVICE_TRACKER

string homeassistant.components.unifi.device_tracker.DEVICE_TRACKER = "device"

Definition at line 45 of file device_tracker.py.

◆ LOGGER

homeassistant.components.unifi.device_tracker.LOGGER = logging.getLogger(__name__)

Definition at line 42 of file device_tracker.py.

◆ WIRED_CONNECTION

tuple homeassistant.components.unifi.device_tracker.WIRED_CONNECTION = (EventKey.WIRED_CLIENT_CONNECTED,)

Definition at line 71 of file device_tracker.py.

◆ WIRED_DISCONNECTION

tuple homeassistant.components.unifi.device_tracker.WIRED_DISCONNECTION = (EventKey.WIRED_CLIENT_DISCONNECTED,)

Definition at line 72 of file device_tracker.py.

◆ WIRELESS_CONNECTION

tuple homeassistant.components.unifi.device_tracker.WIRELESS_CONNECTION
Initial value:
1 = (
2  EventKey.WIRELESS_CLIENT_CONNECTED,
3  EventKey.WIRELESS_CLIENT_ROAM,
4  EventKey.WIRELESS_CLIENT_ROAM_RADIO,
5  EventKey.WIRELESS_GUEST_CONNECTED,
6  EventKey.WIRELESS_GUEST_ROAM,
7  EventKey.WIRELESS_GUEST_ROAM_RADIO,
8 )

Definition at line 73 of file device_tracker.py.

◆ WIRELESS_DISCONNECTION

tuple homeassistant.components.unifi.device_tracker.WIRELESS_DISCONNECTION
Initial value:
1 = (
2  EventKey.WIRELESS_CLIENT_DISCONNECTED,
3  EventKey.WIRELESS_GUEST_DISCONNECTED,
4 )

Definition at line 81 of file device_tracker.py.