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

Classes

class  ProtectSelectEntityDescription
 
class  ProtectSelects
 

Functions

str|None _get_doorbell_current (Camera obj)
 
list[dict[str, Any]] _get_doorbell_options (ProtectApiClient api)
 
list[dict[str, Any]] _get_paired_camera_options (ProtectApiClient api)
 
str _get_viewer_current (Viewer obj)
 
list[dict[str, Any]] _get_viewer_options (ProtectApiClient api)
 
None _set_doorbell_message (Camera obj, str message)
 
None _set_light_mode (Light obj, str mode)
 
None _set_liveview (Viewer obj, str liveview_id)
 
None _set_paired_camera (Light|Sensor|Doorlock obj, str camera_id)
 
None async_setup_entry (HomeAssistant hass, UFPConfigEntry entry, AddEntitiesCallback async_add_entities)
 

Variables

string _KEY_LIGHT_MOTION = "light_motion"
 
 _LOGGER = logging.getLogger(__name__)
 
list CHIME_TYPES
 
list DEVICE_RECORDING_MODES
 
 Final
 
list HDR_MODES
 
list INFRARED_MODES
 
string LIGHT_MODE_DARK = "When Dark"
 
string LIGHT_MODE_MOTION = "On Motion - Always"
 
string LIGHT_MODE_MOTION_DARK = "On Motion - When Dark"
 
string LIGHT_MODE_OFF = "Manual"
 
dictionary LIGHT_MODE_TO_SETTINGS
 
list LIGHT_MODES = [LIGHT_MODE_MOTION, LIGHT_MODE_DARK, LIGHT_MODE_OFF]
 
list MOTION_MODE_TO_LIGHT_MODE
 
list MOUNT_TYPES
 

Detailed Description

Component providing select entities for UniFi Protect.

Function Documentation

◆ _get_doorbell_current()

str | None homeassistant.components.unifiprotect.select._get_doorbell_current ( Camera  obj)
private

Definition at line 156 of file select.py.

◆ _get_doorbell_options()

list[dict[str, Any]] homeassistant.components.unifiprotect.select._get_doorbell_options ( ProtectApiClient  api)
private

Definition at line 124 of file select.py.

◆ _get_paired_camera_options()

list[dict[str, Any]] homeassistant.components.unifiprotect.select._get_paired_camera_options ( ProtectApiClient  api)
private

Definition at line 142 of file select.py.

◆ _get_viewer_current()

str homeassistant.components.unifiprotect.select._get_viewer_current ( Viewer  obj)
private

Definition at line 152 of file select.py.

◆ _get_viewer_options()

list[dict[str, Any]] homeassistant.components.unifiprotect.select._get_viewer_options ( ProtectApiClient  api)
private

Definition at line 118 of file select.py.

◆ _set_doorbell_message()

None homeassistant.components.unifiprotect.select._set_doorbell_message ( Camera  obj,
str  message 
)
private

Definition at line 178 of file select.py.

◆ _set_light_mode()

None homeassistant.components.unifiprotect.select._set_light_mode ( Light  obj,
str  mode 
)
private

Definition at line 162 of file select.py.

◆ _set_liveview()

None homeassistant.components.unifiprotect.select._set_liveview ( Viewer  obj,
str  liveview_id 
)
private

Definition at line 188 of file select.py.

◆ _set_paired_camera()

None homeassistant.components.unifiprotect.select._set_paired_camera ( Light | Sensor | Doorlock  obj,
str  camera_id 
)
private

Definition at line 170 of file select.py.

◆ async_setup_entry()

None homeassistant.components.unifiprotect.select.async_setup_entry ( HomeAssistant  hass,
UFPConfigEntry  entry,
AddEntitiesCallback   async_add_entities 
)
Set up number entities for UniFi Protect integration.

Definition at line 336 of file select.py.

Variable Documentation

◆ _KEY_LIGHT_MOTION

string homeassistant.components.unifiprotect.select._KEY_LIGHT_MOTION = "light_motion"
private

Definition at line 47 of file select.py.

◆ _LOGGER

homeassistant.components.unifiprotect.select._LOGGER = logging.getLogger(__name__)
private

Definition at line 46 of file select.py.

◆ CHIME_TYPES

list homeassistant.components.unifiprotect.select.CHIME_TYPES
Initial value:
1 = [
2  {"id": ChimeType.NONE.value, "name": "None"},
3  {"id": ChimeType.MECHANICAL.value, "name": "Mechanical"},
4  {"id": ChimeType.DIGITAL.value, "name": "Digital"},
5 ]

Definition at line 63 of file select.py.

◆ DEVICE_RECORDING_MODES

list homeassistant.components.unifiprotect.select.DEVICE_RECORDING_MODES
Initial value:
1 = [
2  {"id": mode.value, "name": mode.value.title()} for mode in list(RecordingMode)
3 ]

Definition at line 100 of file select.py.

◆ Final

homeassistant.components.unifiprotect.select.Final

Definition at line 104 of file select.py.

◆ HDR_MODES

list homeassistant.components.unifiprotect.select.HDR_MODES
Initial value:
1 = [
2  {"id": "always", "name": "Always On"},
3  {"id": "off", "name": "Always Off"},
4  {"id": "auto", "name": "Auto"},
5 ]

Definition at line 49 of file select.py.

◆ INFRARED_MODES

list homeassistant.components.unifiprotect.select.INFRARED_MODES
Initial value:
1 = [
2  {"id": IRLEDMode.AUTO.value, "name": "Auto"},
3  {"id": IRLEDMode.ON.value, "name": "Always Enable"},
4  {"id": IRLEDMode.AUTO_NO_LED.value, "name": "Auto (Filter Only, no LED's)"},
5  {"id": IRLEDMode.CUSTOM.value, "name": "Auto (Custom Lux)"},
6  {"id": IRLEDMode.OFF.value, "name": "Always Disable"},
7 ]

Definition at line 55 of file select.py.

◆ LIGHT_MODE_DARK

string homeassistant.components.unifiprotect.select.LIGHT_MODE_DARK = "When Dark"

Definition at line 79 of file select.py.

◆ LIGHT_MODE_MOTION

string homeassistant.components.unifiprotect.select.LIGHT_MODE_MOTION = "On Motion - Always"

Definition at line 77 of file select.py.

◆ LIGHT_MODE_MOTION_DARK

string homeassistant.components.unifiprotect.select.LIGHT_MODE_MOTION_DARK = "On Motion - When Dark"

Definition at line 78 of file select.py.

◆ LIGHT_MODE_OFF

string homeassistant.components.unifiprotect.select.LIGHT_MODE_OFF = "Manual"

Definition at line 80 of file select.py.

◆ LIGHT_MODE_TO_SETTINGS

dictionary homeassistant.components.unifiprotect.select.LIGHT_MODE_TO_SETTINGS
Initial value:
1 = {
2  LIGHT_MODE_MOTION: (LightModeType.MOTION.value, LightModeEnableType.ALWAYS.value),
3  LIGHT_MODE_MOTION_DARK: (
4  LightModeType.MOTION.value,
5  LightModeEnableType.DARK.value,
6  ),
7  LIGHT_MODE_DARK: (LightModeType.WHEN_DARK.value, LightModeEnableType.DARK.value),
8  LIGHT_MODE_OFF: (LightModeType.MANUAL.value, None),
9 }

Definition at line 83 of file select.py.

◆ LIGHT_MODES

list homeassistant.components.unifiprotect.select.LIGHT_MODES = [LIGHT_MODE_MOTION, LIGHT_MODE_DARK, LIGHT_MODE_OFF]

Definition at line 81 of file select.py.

◆ MOTION_MODE_TO_LIGHT_MODE

list homeassistant.components.unifiprotect.select.MOTION_MODE_TO_LIGHT_MODE
Initial value:
1 = [
2  {"id": LightModeType.MOTION.value, "name": LIGHT_MODE_MOTION},
3  {"id": f"{LightModeType.MOTION.value}Dark", "name": LIGHT_MODE_MOTION_DARK},
4  {"id": LightModeType.WHEN_DARK.value, "name": LIGHT_MODE_DARK},
5  {"id": LightModeType.MANUAL.value, "name": LIGHT_MODE_OFF},
6 ]

Definition at line 93 of file select.py.

◆ MOUNT_TYPES

list homeassistant.components.unifiprotect.select.MOUNT_TYPES
Initial value:
1 = [
2  {"id": MountType.NONE.value, "name": "None"},
3  {"id": MountType.DOOR.value, "name": "Door"},
4  {"id": MountType.WINDOW.value, "name": "Window"},
5  {"id": MountType.GARAGE.value, "name": "Garage"},
6  {"id": MountType.LEAK.value, "name": "Leak"},
7 ]

Definition at line 69 of file select.py.