Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.generic.config_flow Namespace Reference

Classes

class  CameraImagePreview
 
class  GenericIPCamConfigFlow
 
class  GenericOptionsFlowHandler
 

Functions

tuple[dict[str, str], str|None] async_test_still (HomeAssistant hass, Mapping[str, Any] info)
 
dict[str, str] async_test_stream (HomeAssistant hass, Mapping[str, Any] info)
 
vol.Schema build_schema (Mapping[str, Any] user_input, bool is_options_flow=False, bool show_advanced_options=False)
 
str|None get_image_type (bytes image)
 
None register_preview (HomeAssistant hass)
 
str|None slug (HomeAssistant hass, str|template_helper.Template|None template)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
dictionary DEFAULT_DATA
 
string IMAGE_PREVIEWS_ACTIVE = "previews"
 
dictionary SUPPORTED_IMAGE_TYPES = {"png", "jpeg", "gif", "svg+xml", "webp"}
 

Detailed Description

Config flow for generic (IP Camera).

Function Documentation

◆ async_test_still()

tuple[dict[str, str], str | None] homeassistant.components.generic.config_flow.async_test_still ( HomeAssistant  hass,
Mapping[str, Any]   info 
)
Verify that the still image is valid before we create an entity.

Definition at line 154 of file config_flow.py.

◆ async_test_stream()

dict[str, str] homeassistant.components.generic.config_flow.async_test_stream ( HomeAssistant  hass,
Mapping[str, Any]   info 
)
Verify that the stream is valid before we create an entity.

Definition at line 234 of file config_flow.py.

◆ build_schema()

vol.Schema homeassistant.components.generic.config_flow.build_schema ( Mapping[str, Any]  user_input,
bool   is_options_flow = False,
bool   show_advanced_options = False 
)
Create schema for camera config setup.

Definition at line 82 of file config_flow.py.

◆ get_image_type()

str | None homeassistant.components.generic.config_flow.get_image_type ( bytes  image)
Get the format of downloaded bytes that could be an image.

Definition at line 138 of file config_flow.py.

◆ register_preview()

None homeassistant.components.generic.config_flow.register_preview ( HomeAssistant  hass)
Set up previews for camera feeds during config flow.

Definition at line 301 of file config_flow.py.

◆ slug()

str | None homeassistant.components.generic.config_flow.slug ( HomeAssistant  hass,
str | template_helper.Template | None   template 
)
Convert a camera url into a string suitable for a camera name.

Definition at line 217 of file config_flow.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.generic.config_flow._LOGGER = logging.getLogger(__name__)
private

Definition at line 68 of file config_flow.py.

◆ DEFAULT_DATA

dictionary homeassistant.components.generic.config_flow.DEFAULT_DATA
Initial value:
1 = {
2  CONF_NAME: DEFAULT_NAME,
3  CONF_AUTHENTICATION: HTTP_BASIC_AUTHENTICATION,
4  CONF_LIMIT_REFETCH_TO_URL_CHANGE: False,
5  CONF_FRAMERATE: 2,
6  CONF_VERIFY_SSL: True,
7 }

Definition at line 70 of file config_flow.py.

◆ IMAGE_PREVIEWS_ACTIVE

string homeassistant.components.generic.config_flow.IMAGE_PREVIEWS_ACTIVE = "previews"

Definition at line 79 of file config_flow.py.

◆ SUPPORTED_IMAGE_TYPES

dictionary homeassistant.components.generic.config_flow.SUPPORTED_IMAGE_TYPES = {"png", "jpeg", "gif", "svg+xml", "webp"}

Definition at line 78 of file config_flow.py.