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" |
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.
|
private |
Return typed configurator_requests data.
Definition at line 144 of file __init__.py.
| 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.
| 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.
| 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.
| bool homeassistant.components.configurator.async_setup | ( | HomeAssistant | hass, |
| ConfigType | config | ||
| ) |
Set up the configurator component.
Definition at line 139 of file __init__.py.
| 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.
| 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.
| 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.
|
private |
Definition at line 31 of file __init__.py.
| string homeassistant.components.configurator.ATTR_CONFIGURE_ID = "configure_id" |
Definition at line 35 of file __init__.py.
| string homeassistant.components.configurator.ATTR_DESCRIPTION = "description" |
Definition at line 36 of file __init__.py.
| string homeassistant.components.configurator.ATTR_DESCRIPTION_IMAGE = "description_image" |
Definition at line 37 of file __init__.py.
| string homeassistant.components.configurator.ATTR_ERRORS = "errors" |
Definition at line 38 of file __init__.py.
| string homeassistant.components.configurator.ATTR_FIELDS = "fields" |
Definition at line 39 of file __init__.py.
| string homeassistant.components.configurator.ATTR_LINK_NAME = "link_name" |
Definition at line 40 of file __init__.py.
| string homeassistant.components.configurator.ATTR_LINK_URL = "link_url" |
Definition at line 41 of file __init__.py.
| string homeassistant.components.configurator.ATTR_SUBMIT_CAPTION = "submit_caption" |
Definition at line 42 of file __init__.py.
| homeassistant.components.configurator.CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN) |
Definition at line 54 of file __init__.py.
| homeassistant.components.configurator.ConfiguratorCallback |
Definition at line 52 of file __init__.py.
| string homeassistant.components.configurator.DATA_REQUESTS = "configurator_requests" |
Definition at line 33 of file __init__.py.
| string homeassistant.components.configurator.DOMAIN = "configurator" |
Definition at line 44 of file __init__.py.
| string homeassistant.components.configurator.ENTITY_ID_FORMAT = DOMAIN + ".{}" |
Definition at line 46 of file __init__.py.
| string homeassistant.components.configurator.SERVICE_CONFIGURE = "configure" |
Definition at line 48 of file __init__.py.
| string homeassistant.components.configurator.STATE_CONFIGURE = "configure" |
Definition at line 49 of file __init__.py.
| string homeassistant.components.configurator.STATE_CONFIGURED = "configured" |
Definition at line 50 of file __init__.py.