|
ESPHome 2026.11.0-dev
|
An input of the wizard that is not tied to an entity of the device. More...
#include <api_wizard.h>
Public Member Functions | |
| WizardInput (const char *entity_id) | |
| StringRef | entity_id () const |
| The Home Assistant entity ID, empty until the wizard sets one. | |
| bool | has_entity_id () const |
| size_t | entity_id_count () const |
| The number of entity IDs in the list, 0 until the wizard sets one. | |
| template<typename F > | |
| void | for_each_entity_id (F &&callback) const |
| Call callback(StringRef) for each entity ID in the list, in order. | |
Protected Attributes | |
| const char * | entity_id_ |
An input of the wizard that is not tied to an entity of the device.
The entity ID the user picks is only ever read by lambdas, for example id(input).entity_id(). It lives in the same RAM buffer a linked input uses.
Definition at line 50 of file api_wizard.h.
|
inlineexplicit |
Definition at line 52 of file api_wizard.h.
|
inline |
The Home Assistant entity ID, empty until the wizard sets one.
For a multiple input this is the whole comma separated list, which homeassistant.action data can use as it is.
Definition at line 55 of file api_wizard.h.
|
inline |
The number of entity IDs in the list, 0 until the wizard sets one.
Definition at line 59 of file api_wizard.h.
|
inline |
Call callback(StringRef) for each entity ID in the list, in order.
The StringRef points into the list and is not null terminated, so print it with "%.*s".
Definition at line 69 of file api_wizard.h.
|
inline |
Definition at line 56 of file api_wizard.h.
|
protected |
Definition at line 83 of file api_wizard.h.