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

Classes

class  CannotConnect
 
class  NotSupported
 
class  PrusaLinkConfigFlow
 

Functions

None ensure_printer_is_supported (VersionInfo version)
 
dict[str, str] validate_input (HomeAssistant hass, dict[str, str] data)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 STEP_USER_DATA_SCHEMA
 

Detailed Description

Config flow for PrusaLink integration.

Function Documentation

◆ ensure_printer_is_supported()

None homeassistant.components.prusalink.config_flow.ensure_printer_is_supported ( VersionInfo  version)
Raise NotSupported exception if the printer is not supported.

Definition at line 37 of file config_flow.py.

◆ validate_input()

dict[str, str] homeassistant.components.prusalink.config_flow.validate_input ( HomeAssistant  hass,
dict[str, str]  data 
)
Validate the user input allows us to connect.

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

Definition at line 57 of file config_flow.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 23 of file config_flow.py.

◆ STEP_USER_DATA_SCHEMA

homeassistant.components.prusalink.config_flow.STEP_USER_DATA_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  vol.Required(CONF_HOST): str,
4  # "maker" is currently hardcoded in the firmware
5  # https://github.com/prusa3d/Prusa-Firmware-Buddy/blob/bfb0ffc745ee6546e7efdba618d0e7c0f4c909cd/lib/WUI/wui_api.h#L19
6  vol.Required(CONF_USERNAME, default="maker"): str,
7  vol.Required(CONF_PASSWORD): str,
8  }
9 )

Definition at line 26 of file config_flow.py.