Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.camera.prefs.CameraPreferences Class Reference

Public Member Functions

None __init__ (self, HomeAssistant hass)
 
None async_load (self)
 
dict[str, bool|Orientation] async_update (self, str entity_id, *bool|UndefinedType preload_stream=UNDEFINED, Orientation|UndefinedType orientation=UNDEFINED)
 
DynamicStreamSettings get_dynamic_stream_settings (self, str entity_id)
 

Private Attributes

 _hass
 
 _preload_prefs
 
 _store
 

Detailed Description

Handle camera preferences.

Definition at line 30 of file prefs.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.camera.prefs.CameraPreferences.__init__ (   self,
HomeAssistant  hass 
)
Initialize camera prefs.

Definition at line 35 of file prefs.py.

Member Function Documentation

◆ async_load()

None homeassistant.components.camera.prefs.CameraPreferences.async_load (   self)
Initialize the camera preferences.

Definition at line 47 of file prefs.py.

◆ async_update()

dict[str, bool | Orientation] homeassistant.components.camera.prefs.CameraPreferences.async_update (   self,
str  entity_id,
*bool | UndefinedType   preload_stream = UNDEFINED,
Orientation | UndefinedType   orientation = UNDEFINED 
)
Update camera preferences.

Also update the DynamicStreamSettings if they exist.
preload_stream is stored in a Store
orientation is stored in the Entity Registry

Returns a dict with the preferences on success.
Raises HomeAssistantError on failure.

Definition at line 51 of file prefs.py.

◆ get_dynamic_stream_settings()

DynamicStreamSettings homeassistant.components.camera.prefs.CameraPreferences.get_dynamic_stream_settings (   self,
str   entity_id 
)
Get the DynamicStreamSettings for the entity.

Definition at line 90 of file prefs.py.

Member Data Documentation

◆ _hass

homeassistant.components.camera.prefs.CameraPreferences._hass
private

Definition at line 37 of file prefs.py.

◆ _preload_prefs

homeassistant.components.camera.prefs.CameraPreferences._preload_prefs
private

Definition at line 49 of file prefs.py.

◆ _store

homeassistant.components.camera.prefs.CameraPreferences._store
private

Definition at line 40 of file prefs.py.


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