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

Classes

class  NutConfigFlow
 
class  OptionsFlowHandler
 

Functions

vol.Schema _base_schema (dict[str, Any] nut_config)
 
str _format_host_port_alias (Mapping[str, Any] user_input)
 
vol.Schema _ups_schema (dict[str, str] ups_list)
 
dict[str, Any] validate_input (HomeAssistant hass, dict[str, Any] data)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
dictionary AUTH_SCHEMA = {vol.Optional(CONF_USERNAME): str, vol.Optional(CONF_PASSWORD): str}
 

Detailed Description

Config flow for Network UPS Tools (NUT) integration.

Function Documentation

◆ _base_schema()

vol.Schema homeassistant.components.nut.config_flow._base_schema ( dict[str, Any]  nut_config)
private
Generate base schema.

Definition at line 39 of file config_flow.py.

◆ _format_host_port_alias()

str homeassistant.components.nut.config_flow._format_host_port_alias ( Mapping[str, Any]  user_input)
private
Format a host, port, and alias so it can be used for comparison or display.

Definition at line 75 of file config_flow.py.

◆ _ups_schema()

vol.Schema homeassistant.components.nut.config_flow._ups_schema ( dict[str, str]  ups_list)
private
UPS selection schema.

Definition at line 49 of file config_flow.py.

◆ validate_input()

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

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

Definition at line 54 of file config_flow.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 34 of file config_flow.py.

◆ AUTH_SCHEMA

dictionary homeassistant.components.nut.config_flow.AUTH_SCHEMA = {vol.Optional(CONF_USERNAME): str, vol.Optional(CONF_PASSWORD): str}

Definition at line 36 of file config_flow.py.