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

Functions

set[ProtectApiClient] _async_get_protect_from_call (HomeAssistant hass, ServiceCall call)
 
Camera _async_get_ufp_camera (HomeAssistant hass, ServiceCall call)
 
ProtectApiClient _async_get_ufp_instance (HomeAssistant hass, str device_id)
 
None _async_service_call_nvr (HomeAssistant hass, ServiceCall call, str method, *Any args, **Any kwargs)
 
str _async_unique_id_to_mac (str unique_id)
 
None add_doorbell_text (HomeAssistant hass, ServiceCall call)
 
None async_setup_services (HomeAssistant hass)
 
None remove_doorbell_text (HomeAssistant hass, ServiceCall call)
 
None remove_privacy_zone (HomeAssistant hass, ServiceCall call)
 
None set_chime_paired_doorbells (HomeAssistant hass, ServiceCall call)
 

Variables

list ALL_GLOBAL_SERIVCES
 
 CHIME_PAIRED_SCHEMA
 
 DOORBELL_TEXT_SCHEMA
 
 REMOVE_PRIVACY_ZONE_SCHEMA
 
string SERVICE_ADD_DOORBELL_TEXT = "add_doorbell_text"
 
string SERVICE_REMOVE_DOORBELL_TEXT = "remove_doorbell_text"
 
string SERVICE_REMOVE_PRIVACY_ZONE = "remove_privacy_zone"
 
string SERVICE_SET_CHIME_PAIRED = "set_chime_paired_doorbells"
 
string SERVICE_SET_PRIVACY_ZONE = "set_privacy_zone"
 

Detailed Description

UniFi Protect Integration services.

Function Documentation

◆ _async_get_protect_from_call()

set[ProtectApiClient] homeassistant.components.unifiprotect.services._async_get_protect_from_call ( HomeAssistant  hass,
ServiceCall   call 
)
private

Definition at line 106 of file services.py.

◆ _async_get_ufp_camera()

Camera homeassistant.components.unifiprotect.services._async_get_ufp_camera ( HomeAssistant  hass,
ServiceCall  call 
)
private

Definition at line 91 of file services.py.

◆ _async_get_ufp_instance()

ProtectApiClient homeassistant.components.unifiprotect.services._async_get_ufp_instance ( HomeAssistant  hass,
str  device_id 
)
private

Definition at line 75 of file services.py.

◆ _async_service_call_nvr()

None homeassistant.components.unifiprotect.services._async_service_call_nvr ( HomeAssistant  hass,
ServiceCall  call,
str  method,
*Any  args,
**Any  kwargs 
)
private

Definition at line 117 of file services.py.

◆ _async_unique_id_to_mac()

str homeassistant.components.unifiprotect.services._async_unique_id_to_mac ( str  unique_id)
private
Extract the MAC address from the registry entry unique id.

Definition at line 169 of file services.py.

◆ add_doorbell_text()

None homeassistant.components.unifiprotect.services.add_doorbell_text ( HomeAssistant  hass,
ServiceCall  call 
)
Add a custom doorbell text message.

Definition at line 133 of file services.py.

◆ async_setup_services()

None homeassistant.components.unifiprotect.services.async_setup_services ( HomeAssistant  hass)
Set up the global UniFi Protect services.

Definition at line 212 of file services.py.

◆ remove_doorbell_text()

None homeassistant.components.unifiprotect.services.remove_doorbell_text ( HomeAssistant  hass,
ServiceCall  call 
)
Remove a custom doorbell text message.

Definition at line 139 of file services.py.

◆ remove_privacy_zone()

None homeassistant.components.unifiprotect.services.remove_privacy_zone ( HomeAssistant  hass,
ServiceCall  call 
)
Remove privacy zone from camera.

Definition at line 145 of file services.py.

◆ set_chime_paired_doorbells()

None homeassistant.components.unifiprotect.services.set_chime_paired_doorbells ( HomeAssistant  hass,
ServiceCall  call 
)
Set paired doorbells on chime.

Definition at line 174 of file services.py.

Variable Documentation

◆ ALL_GLOBAL_SERIVCES

list homeassistant.components.unifiprotect.services.ALL_GLOBAL_SERIVCES
Initial value:
1 = [
2  SERVICE_ADD_DOORBELL_TEXT,
3  SERVICE_REMOVE_DOORBELL_TEXT,
4  SERVICE_SET_CHIME_PAIRED,
5  SERVICE_REMOVE_PRIVACY_ZONE,
6 ]

Definition at line 36 of file services.py.

◆ CHIME_PAIRED_SCHEMA

homeassistant.components.unifiprotect.services.CHIME_PAIRED_SCHEMA
Initial value:
1 = vol.All(
2  vol.Schema(
3  {
4  **cv.ENTITY_SERVICE_FIELDS,
5  "doorbells": cv.TARGET_SERVICE_FIELDS,
6  },
7  ),
8  cv.has_at_least_one_key(ATTR_DEVICE_ID),
9 )

Definition at line 53 of file services.py.

◆ DOORBELL_TEXT_SCHEMA

homeassistant.components.unifiprotect.services.DOORBELL_TEXT_SCHEMA
Initial value:
1 = vol.All(
2  vol.Schema(
3  {
4  **cv.ENTITY_SERVICE_FIELDS,
5  vol.Required(ATTR_MESSAGE): cv.string,
6  },
7  ),
8  cv.has_at_least_one_key(ATTR_DEVICE_ID),
9 )

Definition at line 43 of file services.py.

◆ REMOVE_PRIVACY_ZONE_SCHEMA

homeassistant.components.unifiprotect.services.REMOVE_PRIVACY_ZONE_SCHEMA
Initial value:
1 = vol.All(
2  vol.Schema(
3  {
4  **cv.ENTITY_SERVICE_FIELDS,
5  vol.Required(ATTR_NAME): cv.string,
6  },
7  ),
8  cv.has_at_least_one_key(ATTR_DEVICE_ID),
9 )

Definition at line 63 of file services.py.

◆ SERVICE_ADD_DOORBELL_TEXT

string homeassistant.components.unifiprotect.services.SERVICE_ADD_DOORBELL_TEXT = "add_doorbell_text"

Definition at line 30 of file services.py.

◆ SERVICE_REMOVE_DOORBELL_TEXT

string homeassistant.components.unifiprotect.services.SERVICE_REMOVE_DOORBELL_TEXT = "remove_doorbell_text"

Definition at line 31 of file services.py.

◆ SERVICE_REMOVE_PRIVACY_ZONE

string homeassistant.components.unifiprotect.services.SERVICE_REMOVE_PRIVACY_ZONE = "remove_privacy_zone"

Definition at line 33 of file services.py.

◆ SERVICE_SET_CHIME_PAIRED

string homeassistant.components.unifiprotect.services.SERVICE_SET_CHIME_PAIRED = "set_chime_paired_doorbells"

Definition at line 34 of file services.py.

◆ SERVICE_SET_PRIVACY_ZONE

string homeassistant.components.unifiprotect.services.SERVICE_SET_PRIVACY_ZONE = "set_privacy_zone"

Definition at line 32 of file services.py.