Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.unifi.hub.hub.UnifiHub Class Reference

Public Member Functions

None __init__ (self, HomeAssistant hass, UnifiConfigEntry config_entry, aiounifi.Controller api)
 
bool async_reset (self)
 
DeviceEntry async_update_device_registry (self)
 
bool available (self)
 
DeviceInfo device_info (self)
 
None initialize (self)
 
None queue_poe_port_command (self, str device_id, int port_idx, str poe_mode)
 
None remove_heartbeat (self, str unique_id)
 
None shutdown (self, Event event)
 
str signal_heartbeat_missed (self)
 
str signal_options_update (self)
 
str signal_reachable (self)
 
None update_heartbeat (self, str unique_id, datetime heartbeat_expire_time)
 

Static Public Member Functions

None async_config_entry_updated (HomeAssistant hass, UnifiConfigEntry config_entry)
 

Public Attributes

 api
 
 config
 
 entity_loader
 
 hass
 
 is_admin
 
 site
 
 websocket
 

Private Attributes

 _entity_helper
 

Detailed Description

Manages a single UniFi Network instance.

Definition at line 29 of file hub.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.unifi.hub.hub.UnifiHub.__init__ (   self,
HomeAssistant  hass,
UnifiConfigEntry  config_entry,
aiounifi.Controller  api 
)
Initialize the system.

Definition at line 32 of file hub.py.

Member Function Documentation

◆ async_config_entry_updated()

None homeassistant.components.unifi.hub.hub.UnifiHub.async_config_entry_updated ( HomeAssistant  hass,
UnifiConfigEntry   config_entry 
)
static
Handle signals of config entry being updated.

If config entry is updated due to reauth flow
the entry might already have been reset and thus is not available.

Definition at line 123 of file hub.py.

◆ async_reset()

bool homeassistant.components.unifi.hub.hub.UnifiHub.async_reset (   self)
Reset this hub to default state.

Will cancel any scheduled setup retry and will unload
the config entry.

Definition at line 143 of file hub.py.

◆ async_update_device_registry()

DeviceEntry homeassistant.components.unifi.hub.hub.UnifiHub.async_update_device_registry (   self)
Update device registry.

Definition at line 115 of file hub.py.

◆ available()

bool homeassistant.components.unifi.hub.hub.UnifiHub.available (   self)
Websocket connection state.

Definition at line 50 of file hub.py.

◆ device_info()

DeviceInfo homeassistant.components.unifi.hub.hub.UnifiHub.device_info (   self)
UniFi Network device info.

Definition at line 97 of file hub.py.

◆ initialize()

None homeassistant.components.unifi.hub.hub.UnifiHub.initialize (   self)
Set up a UniFi Network instance.

Definition at line 86 of file hub.py.

◆ queue_poe_port_command()

None homeassistant.components.unifi.hub.hub.UnifiHub.queue_poe_port_command (   self,
str  device_id,
int  port_idx,
str   poe_mode 
)
Queue commands to execute them together per device.

Definition at line 70 of file hub.py.

◆ remove_heartbeat()

None homeassistant.components.unifi.hub.hub.UnifiHub.remove_heartbeat (   self,
str  unique_id 
)
Update device time in heartbeat monitor.

Definition at line 65 of file hub.py.

◆ shutdown()

None homeassistant.components.unifi.hub.hub.UnifiHub.shutdown (   self,
Event  event 
)
Wrap the call to unifi.close.

Used as an argument to EventBus.async_listen_once.

Definition at line 136 of file hub.py.

◆ signal_heartbeat_missed()

str homeassistant.components.unifi.hub.hub.UnifiHub.signal_heartbeat_missed (   self)
Event to signal new heartbeat missed.

Definition at line 55 of file hub.py.

◆ signal_options_update()

str homeassistant.components.unifi.hub.hub.UnifiHub.signal_options_update (   self)
Event specific per UniFi entry to signal new options.

Definition at line 82 of file hub.py.

◆ signal_reachable()

str homeassistant.components.unifi.hub.hub.UnifiHub.signal_reachable (   self)
Integration specific event to signal a change in connection status.

Definition at line 77 of file hub.py.

◆ update_heartbeat()

None homeassistant.components.unifi.hub.hub.UnifiHub.update_heartbeat (   self,
str  unique_id,
datetime  heartbeat_expire_time 
)
Update device time in heartbeat monitor.

Definition at line 60 of file hub.py.

Member Data Documentation

◆ _entity_helper

homeassistant.components.unifi.hub.hub.UnifiHub._entity_helper
private

Definition at line 43 of file hub.py.

◆ api

homeassistant.components.unifi.hub.hub.UnifiHub.api

Definition at line 40 of file hub.py.

◆ config

homeassistant.components.unifi.hub.hub.UnifiHub.config

Definition at line 41 of file hub.py.

◆ entity_loader

homeassistant.components.unifi.hub.hub.UnifiHub.entity_loader

Definition at line 42 of file hub.py.

◆ hass

homeassistant.components.unifi.hub.hub.UnifiHub.hass

Definition at line 39 of file hub.py.

◆ is_admin

homeassistant.components.unifi.hub.hub.UnifiHub.is_admin

Definition at line 47 of file hub.py.

◆ site

homeassistant.components.unifi.hub.hub.UnifiHub.site

Definition at line 46 of file hub.py.

◆ websocket

homeassistant.components.unifi.hub.hub.UnifiHub.websocket

Definition at line 44 of file hub.py.


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