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

Classes

class  Elkm1ConfigFlow
 
class  InvalidAuth
 

Functions

str _address_from_discovery (ElkSystem device)
 
str _make_url_from_data (dict[str, str] data)
 
dict[str, str] _placeholders_from_device (ElkSystem device)
 
dict[str, str] validate_input (dict[str, str] data, str|None mac)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
list ALL_PROTOCOLS = [*SECURE_PROTOCOLS, "non-secure", "serial"]
 
string CONF_DEVICE = "device"
 
 CONF_PASSWORD
 
 CONF_USERNAME
 
 default
 
string DEFAULT_NON_SECURE_PROTOCOL = "non-secure"
 
string DEFAULT_SECURE_PROTOCOL = "secure"
 
int NON_SECURE_PORT = 2101
 
dictionary PORT_PROTOCOL_MAP
 
dictionary PROTOCOL_MAP
 
int SECURE_PORT = 2601
 
list SECURE_PROTOCOLS = ["secure", "TLS 1.2"]
 
dictionary STANDARD_PORTS = {NON_SECURE_PORT, SECURE_PORT}
 
int VALIDATE_TIMEOUT = 35
 
 VolDictType
 

Detailed Description

Config flow for Elk-M1 Control integration.

Function Documentation

◆ _address_from_discovery()

str homeassistant.components.elkm1.config_flow._address_from_discovery ( ElkSystem  device)
private
Append the port only if its non-standard.

Definition at line 107 of file config_flow.py.

◆ _make_url_from_data()

str homeassistant.components.elkm1.config_flow._make_url_from_data ( dict[str, str]  data)
private

Definition at line 114 of file config_flow.py.

◆ _placeholders_from_device()

dict[str, str] homeassistant.components.elkm1.config_flow._placeholders_from_device ( ElkSystem  device)
private

Definition at line 123 of file config_flow.py.

◆ validate_input()

dict[str, str] homeassistant.components.elkm1.config_flow.validate_input ( dict[str, str]  data,
str | None  mac 
)
Validate the user input allows us to connect.

Data has the keys from DATA_SCHEMA with values provided by the user.

Definition at line 71 of file config_flow.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 43 of file config_flow.py.

◆ ALL_PROTOCOLS

list homeassistant.components.elkm1.config_flow.ALL_PROTOCOLS = [*SECURE_PROTOCOLS, "non-secure", "serial"]

Definition at line 61 of file config_flow.py.

◆ CONF_DEVICE

string homeassistant.components.elkm1.config_flow.CONF_DEVICE = "device"

Definition at line 37 of file config_flow.py.

◆ CONF_PASSWORD

homeassistant.components.elkm1.config_flow.CONF_PASSWORD

Definition at line 57 of file config_flow.py.

◆ CONF_USERNAME

homeassistant.components.elkm1.config_flow.CONF_USERNAME

Definition at line 56 of file config_flow.py.

◆ default

homeassistant.components.elkm1.config_flow.default

Definition at line 56 of file config_flow.py.

◆ DEFAULT_NON_SECURE_PROTOCOL

string homeassistant.components.elkm1.config_flow.DEFAULT_NON_SECURE_PROTOCOL = "non-secure"

Definition at line 63 of file config_flow.py.

◆ DEFAULT_SECURE_PROTOCOL

string homeassistant.components.elkm1.config_flow.DEFAULT_SECURE_PROTOCOL = "secure"

Definition at line 62 of file config_flow.py.

◆ NON_SECURE_PORT

int homeassistant.components.elkm1.config_flow.NON_SECURE_PORT = 2101

Definition at line 39 of file config_flow.py.

◆ PORT_PROTOCOL_MAP

dictionary homeassistant.components.elkm1.config_flow.PORT_PROTOCOL_MAP
Initial value:
1 = {
2  NON_SECURE_PORT: DEFAULT_NON_SECURE_PROTOCOL,
3  SECURE_PORT: DEFAULT_SECURE_PROTOCOL,
4 }

Definition at line 65 of file config_flow.py.

◆ PROTOCOL_MAP

dictionary homeassistant.components.elkm1.config_flow.PROTOCOL_MAP
Initial value:
1 = {
2  "secure": "elks://",
3  "TLS 1.2": "elksv1_2://",
4  "non-secure": "elk://",
5  "serial": "serial://",
6 }

Definition at line 45 of file config_flow.py.

◆ SECURE_PORT

int homeassistant.components.elkm1.config_flow.SECURE_PORT = 2601

Definition at line 40 of file config_flow.py.

◆ SECURE_PROTOCOLS

list homeassistant.components.elkm1.config_flow.SECURE_PROTOCOLS = ["secure", "TLS 1.2"]

Definition at line 60 of file config_flow.py.

◆ STANDARD_PORTS

dictionary homeassistant.components.elkm1.config_flow.STANDARD_PORTS = {NON_SECURE_PORT, SECURE_PORT}

Definition at line 41 of file config_flow.py.

◆ VALIDATE_TIMEOUT

int homeassistant.components.elkm1.config_flow.VALIDATE_TIMEOUT = 35

Definition at line 53 of file config_flow.py.

◆ VolDictType

homeassistant.components.elkm1.config_flow.VolDictType

Definition at line 55 of file config_flow.py.