Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.unifi.hub.entity_loader.UnifiEntityLoader Class Reference

Public Member Functions

None __init__ (self, UnifiHub hub)
 
None initialize (self)
 
None load_entities (self)
 
None register_platform (self, AddEntitiesCallback async_add_entities, type[UnifiEntity] entity_class, tuple[UnifiEntityDescription,...] descriptions, bool requires_admin=False)
 

Public Attributes

 api_updaters
 
 hub
 
 polling_api_updaters
 
 wireless_clients
 

Private Member Functions

None _load_entities (self, type[UnifiEntity] unifi_platform_entity, tuple[UnifiEntityDescription,...] descriptions, AddEntitiesCallback async_add_entities)
 
None _refresh_api_data (self)
 
None _refresh_data (self, Sequence[Callable[[], Coroutine[Any, Any, None]]] updaters)
 
None _restore_inactive_clients (self)
 
bool _should_add_entity (self, UnifiEntityDescription description, str obj_id)
 
None _update_pollable_api_data (self)
 

Private Attributes

 _dataUpdateCoordinator
 
 _update_listener
 

Detailed Description

UniFi Network integration handling platforms for entity registration.

Definition at line 34 of file entity_loader.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.unifi.hub.entity_loader.UnifiEntityLoader.__init__ (   self,
UnifiHub  hub 
)
Initialize the UniFi entity loader.

Definition at line 37 of file entity_loader.py.

Member Function Documentation

◆ _load_entities()

None homeassistant.components.unifi.hub.entity_loader.UnifiEntityLoader._load_entities (   self,
type[UnifiEntity unifi_platform_entity,
tuple[UnifiEntityDescription, ...]  descriptions,
AddEntitiesCallback  async_add_entities 
)
private
Load entities and subscribe for future entities.

Definition at line 162 of file entity_loader.py.

◆ _refresh_api_data()

None homeassistant.components.unifi.hub.entity_loader.UnifiEntityLoader._refresh_api_data (   self)
private
Refresh API data from network application.

Definition at line 100 of file entity_loader.py.

◆ _refresh_data()

None homeassistant.components.unifi.hub.entity_loader.UnifiEntityLoader._refresh_data (   self,
Sequence[Callable[[], Coroutine[Any, Any, None]]]   updaters 
)
private

Definition at line 85 of file entity_loader.py.

◆ _restore_inactive_clients()

None homeassistant.components.unifi.hub.entity_loader.UnifiEntityLoader._restore_inactive_clients (   self)
private
Restore inactive clients.

Provide inactive clients to device tracker and switch platform.

Definition at line 105 of file entity_loader.py.

◆ _should_add_entity()

bool homeassistant.components.unifi.hub.entity_loader.UnifiEntityLoader._should_add_entity (   self,
UnifiEntityDescription  description,
str   obj_id 
)
private
Validate if entity is allowed and supported before creating it.

Definition at line 151 of file entity_loader.py.

◆ _update_pollable_api_data()

None homeassistant.components.unifi.hub.entity_loader.UnifiEntityLoader._update_pollable_api_data (   self)
private
Refresh API data for pollable updaters.

Definition at line 96 of file entity_loader.py.

◆ initialize()

None homeassistant.components.unifi.hub.entity_loader.UnifiEntityLoader.initialize (   self)
Initialize API data and extra client support.

Definition at line 79 of file entity_loader.py.

◆ load_entities()

None homeassistant.components.unifi.hub.entity_loader.UnifiEntityLoader.load_entities (   self)
Load entities into the registered UniFi platforms.

Definition at line 138 of file entity_loader.py.

◆ register_platform()

None homeassistant.components.unifi.hub.entity_loader.UnifiEntityLoader.register_platform (   self,
AddEntitiesCallback  async_add_entities,
type[UnifiEntity entity_class,
tuple[UnifiEntityDescription, ...]  descriptions,
bool   requires_admin = False 
)
Register UniFi entity platforms.

Definition at line 125 of file entity_loader.py.

Member Data Documentation

◆ _dataUpdateCoordinator

homeassistant.components.unifi.hub.entity_loader.UnifiEntityLoader._dataUpdateCoordinator
private

Definition at line 55 of file entity_loader.py.

◆ _update_listener

homeassistant.components.unifi.hub.entity_loader.UnifiEntityLoader._update_listener
private

Definition at line 63 of file entity_loader.py.

◆ api_updaters

homeassistant.components.unifi.hub.entity_loader.UnifiEntityLoader.api_updaters

Definition at line 40 of file entity_loader.py.

◆ hub

homeassistant.components.unifi.hub.entity_loader.UnifiEntityLoader.hub

Definition at line 39 of file entity_loader.py.

◆ polling_api_updaters

homeassistant.components.unifi.hub.entity_loader.UnifiEntityLoader.polling_api_updaters

Definition at line 52 of file entity_loader.py.

◆ wireless_clients

homeassistant.components.unifi.hub.entity_loader.UnifiEntityLoader.wireless_clients

Definition at line 53 of file entity_loader.py.


The documentation for this class was generated from the following file: