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

Classes

class  MySensorsConfigFlowHandler
 

Functions

dict _get_schema_common (dict[str, str] user_input)
 
bool _is_same_device (ConfGatewayType gw_type, dict[str, Any] user_input, ConfigEntry entry)
 
dict[str, str] _validate_version (str version)
 
str is_persistence_file (str value)
 

Variables

 _PORT_SELECTOR
 
int DEFAULT_BAUD_RATE = 115200
 
int DEFAULT_TCP_PORT = 5003
 
string DEFAULT_VERSION = "1.4"
 

Detailed Description

Config flow for MySensors.

Function Documentation

◆ _get_schema_common()

dict homeassistant.components.mysensors.config_flow._get_schema_common ( dict[str, str]  user_input)
private
Create a schema with options common to all gateway types.

Definition at line 65 of file config_flow.py.

◆ _is_same_device()

bool homeassistant.components.mysensors.config_flow._is_same_device ( ConfGatewayType  gw_type,
dict[str, Any]  user_input,
ConfigEntry   entry 
)
private
Check if another ConfigDevice is actually the same as user_input.

This function only compares addresses and tcp ports, so it is possible to fool it with tricks like port forwarding.

Definition at line 97 of file config_flow.py.

◆ _validate_version()

dict[str, str] homeassistant.components.mysensors.config_flow._validate_version ( str  version)
private
Validate a version string from the user.

Definition at line 78 of file config_flow.py.

◆ is_persistence_file()

str homeassistant.components.mysensors.config_flow.is_persistence_file ( str  value)
Validate that persistence file path ends in either .pickle or .json.

Definition at line 58 of file config_flow.py.

Variable Documentation

◆ _PORT_SELECTOR

homeassistant.components.mysensors.config_flow._PORT_SELECTOR
private
Initial value:
1 = vol.All(
2  selector.NumberSelector(
3  selector.NumberSelectorConfig(
4  min=1, max=65535, mode=selector.NumberSelectorMode.BOX
5  ),
6  ),
7  vol.Coerce(int),
8 )

Definition at line 48 of file config_flow.py.

◆ DEFAULT_BAUD_RATE

int homeassistant.components.mysensors.config_flow.DEFAULT_BAUD_RATE = 115200

Definition at line 44 of file config_flow.py.

◆ DEFAULT_TCP_PORT

int homeassistant.components.mysensors.config_flow.DEFAULT_TCP_PORT = 5003

Definition at line 45 of file config_flow.py.

◆ DEFAULT_VERSION

string homeassistant.components.mysensors.config_flow.DEFAULT_VERSION = "1.4"

Definition at line 46 of file config_flow.py.