Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.configurator Namespace Reference

Classes

class  Configurator
 

Functions

dict[str, Configurator_get_requests (HomeAssistant hass)
 
None async_notify_errors (HomeAssistant hass, str request_id, str error)
 
str async_request_config (HomeAssistant hass, str name, ConfiguratorCallback|None callback=None, str|None description=None, str|None description_image=None, str|None submit_caption=None, list[dict[str, str]]|None fields=None, str|None link_name=None, str|None link_url=None, str|None entity_picture=None)
 
None async_request_done (HomeAssistant hass, str request_id)
 
bool async_setup (HomeAssistant hass, ConfigType config)
 
None notify_errors (HomeAssistant hass, str request_id, str error)
 
str request_config (HomeAssistant hass, *Any args, **Any kwargs)
 
None request_done (HomeAssistant hass, str request_id)
 

Variables

string _KEY_INSTANCE = "configurator"
 
string ATTR_CONFIGURE_ID = "configure_id"
 
string ATTR_DESCRIPTION = "description"
 
string ATTR_DESCRIPTION_IMAGE = "description_image"
 
string ATTR_ERRORS = "errors"
 
string ATTR_FIELDS = "fields"
 
string ATTR_LINK_NAME = "link_name"
 
string ATTR_LINK_URL = "link_url"
 
string ATTR_SUBMIT_CAPTION = "submit_caption"
 
 CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
 
 ConfiguratorCallback
 
string DATA_REQUESTS = "configurator_requests"
 
string DOMAIN = "configurator"
 
string ENTITY_ID_FORMAT = DOMAIN + ".{}"
 
string SERVICE_CONFIGURE = "configure"
 
string STATE_CONFIGURE = "configure"
 
string STATE_CONFIGURED = "configured"
 

Detailed Description

Support to allow pieces of code to request configuration from the user.

Initiate a request by calling the `request_config` method with a callback.
This will return a request id that has to be used for future calls.
A callback has to be provided to `request_config` which will be called when
the user has submitted configuration information.

Function Documentation

◆ _get_requests()

dict[str, Configurator] homeassistant.components.configurator._get_requests ( HomeAssistant  hass)
private
Return typed configurator_requests data.

Definition at line 144 of file __init__.py.

◆ async_notify_errors()

None homeassistant.components.configurator.async_notify_errors ( HomeAssistant  hass,
str  request_id,
str  error 
)
Add errors to a config request.

Definition at line 109 of file __init__.py.

◆ async_request_config()

str homeassistant.components.configurator.async_request_config ( HomeAssistant  hass,
str  name,
ConfiguratorCallback | None   callback = None,
str | None   description = None,
str | None   description_image = None,
str | None   submit_caption = None,
list[dict[str, str]] | None   fields = None,
str | None   link_name = None,
str | None   link_url = None,
str | None   entity_picture = None 
)
Create a new request for configuration.

Will return an ID to be used for sequent calls.

Definition at line 59 of file __init__.py.

◆ async_request_done()

None homeassistant.components.configurator.async_request_done ( HomeAssistant  hass,
str  request_id 
)
Mark a configuration request as done.

Definition at line 125 of file __init__.py.

◆ async_setup()

bool homeassistant.components.configurator.async_setup ( HomeAssistant  hass,
ConfigType  config 
)
Set up the configurator component.

Definition at line 139 of file __init__.py.

◆ notify_errors()

None homeassistant.components.configurator.notify_errors ( HomeAssistant  hass,
str  request_id,
str  error 
)
Add errors to a config request.

Definition at line 116 of file __init__.py.

◆ request_config()

str homeassistant.components.configurator.request_config ( HomeAssistant  hass,
*Any  args,
**Any  kwargs 
)
Create a new request for configuration.

Will return an ID to be used for sequent calls.

Definition at line 97 of file __init__.py.

◆ request_done()

None homeassistant.components.configurator.request_done ( HomeAssistant  hass,
str  request_id 
)
Mark a configuration request as done.

Definition at line 132 of file __init__.py.

Variable Documentation

◆ _KEY_INSTANCE

string homeassistant.components.configurator._KEY_INSTANCE = "configurator"
private

Definition at line 31 of file __init__.py.

◆ ATTR_CONFIGURE_ID

string homeassistant.components.configurator.ATTR_CONFIGURE_ID = "configure_id"

Definition at line 35 of file __init__.py.

◆ ATTR_DESCRIPTION

string homeassistant.components.configurator.ATTR_DESCRIPTION = "description"

Definition at line 36 of file __init__.py.

◆ ATTR_DESCRIPTION_IMAGE

string homeassistant.components.configurator.ATTR_DESCRIPTION_IMAGE = "description_image"

Definition at line 37 of file __init__.py.

◆ ATTR_ERRORS

string homeassistant.components.configurator.ATTR_ERRORS = "errors"

Definition at line 38 of file __init__.py.

◆ ATTR_FIELDS

string homeassistant.components.configurator.ATTR_FIELDS = "fields"

Definition at line 39 of file __init__.py.

◆ ATTR_LINK_NAME

string homeassistant.components.configurator.ATTR_LINK_NAME = "link_name"

Definition at line 40 of file __init__.py.

◆ ATTR_LINK_URL

string homeassistant.components.configurator.ATTR_LINK_URL = "link_url"

Definition at line 41 of file __init__.py.

◆ ATTR_SUBMIT_CAPTION

string homeassistant.components.configurator.ATTR_SUBMIT_CAPTION = "submit_caption"

Definition at line 42 of file __init__.py.

◆ CONFIG_SCHEMA

homeassistant.components.configurator.CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)

Definition at line 54 of file __init__.py.

◆ ConfiguratorCallback

homeassistant.components.configurator.ConfiguratorCallback

Definition at line 52 of file __init__.py.

◆ DATA_REQUESTS

string homeassistant.components.configurator.DATA_REQUESTS = "configurator_requests"

Definition at line 33 of file __init__.py.

◆ DOMAIN

string homeassistant.components.configurator.DOMAIN = "configurator"

Definition at line 44 of file __init__.py.

◆ ENTITY_ID_FORMAT

string homeassistant.components.configurator.ENTITY_ID_FORMAT = DOMAIN + ".{}"

Definition at line 46 of file __init__.py.

◆ SERVICE_CONFIGURE

string homeassistant.components.configurator.SERVICE_CONFIGURE = "configure"

Definition at line 48 of file __init__.py.

◆ STATE_CONFIGURE

string homeassistant.components.configurator.STATE_CONFIGURE = "configure"

Definition at line 49 of file __init__.py.

◆ STATE_CONFIGURED

string homeassistant.components.configurator.STATE_CONFIGURED = "configured"

Definition at line 50 of file __init__.py.