Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.unifiprotect.utils Namespace Reference

Functions

str|None _async_resolve (HomeAssistant hass, str host)
 
str _async_short_mac (str mac)
 
str _async_unifi_mac_from_hass (str mac)
 
ProtectApiClient async_create_api_client (HomeAssistant hass, UFPConfigEntry entry)
 
Generator[ProtectAdoptableDeviceModel] async_get_devices (Bootstrap bootstrap, Iterable[ModelType] model_type)
 
dict[str, ProtectAdoptableDeviceModel] async_get_devices_by_type (Bootstrap bootstrap, ModelType device_type)
 
str async_get_light_motion_current (Light obj)
 
str get_camera_base_name (CameraChannel channel)
 

Detailed Description

UniFi Protect Integration utils.

Function Documentation

◆ _async_resolve()

str | None homeassistant.components.unifiprotect.utils._async_resolve ( HomeAssistant  hass,
str  host 
)
private
Resolve a hostname to an ip.

Definition at line 56 of file utils.py.

◆ _async_short_mac()

str homeassistant.components.unifiprotect.utils._async_short_mac ( str  mac)
private
Get the short mac address from the full mac.

Definition at line 51 of file utils.py.

◆ _async_unifi_mac_from_hass()

str homeassistant.components.unifiprotect.utils._async_unifi_mac_from_hass ( str  mac)
private

Definition at line 45 of file utils.py.

◆ async_create_api_client()

ProtectApiClient homeassistant.components.unifiprotect.utils.async_create_api_client ( HomeAssistant  hass,
UFPConfigEntry   entry 
)
Create ProtectApiClient from config entry.

Definition at line 107 of file utils.py.

◆ async_get_devices()

Generator[ProtectAdoptableDeviceModel] homeassistant.components.unifiprotect.utils.async_get_devices ( Bootstrap  bootstrap,
Iterable[ModelType]   model_type 
)
Return all device by type.

Definition at line 83 of file utils.py.

◆ async_get_devices_by_type()

dict[str, ProtectAdoptableDeviceModel] homeassistant.components.unifiprotect.utils.async_get_devices_by_type ( Bootstrap  bootstrap,
ModelType   device_type 
)
Get devices by type.

Definition at line 73 of file utils.py.

◆ async_get_light_motion_current()

str homeassistant.components.unifiprotect.utils.async_get_light_motion_current ( Light  obj)
Get light motion mode for Flood Light.

Definition at line 95 of file utils.py.

◆ get_camera_base_name()

str homeassistant.components.unifiprotect.utils.get_camera_base_name ( CameraChannel  channel)
Get base name for cameras channel.

Definition at line 130 of file utils.py.