ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esphome::api::HomeAssistantField< Ts > Struct Template Reference

A key and value from codegen; on ESP8266 the table and its strings are in flash. More...

#include <homeassistant_service.h>

Static Public Member Functions

template<typename F >
static constexpr HomeAssistantField from_lambda (const char *key, F)
 
template<typename F >
static std::string call_lambda (const Ts &...x)
 

Data Fields

const char * key
 
const char * value
 
std::string(* fn )(const Ts &...)
 

Detailed Description

template<typename... Ts>
struct esphome::api::HomeAssistantField< Ts >

A key and value from codegen; on ESP8266 the table and its strings are in flash.

The value is the constant value, or the result of fn when it is set.

Definition at line 33 of file homeassistant_service.h.

Member Function Documentation

◆ call_lambda()

template<typename... Ts>
template<typename F >
static std::string esphome::api::HomeAssistantField< Ts >::call_lambda ( const Ts &... x)
inlinestatic

Definition at line 41 of file homeassistant_service.h.

◆ from_lambda()

template<typename... Ts>
template<typename F >
static constexpr HomeAssistantField esphome::api::HomeAssistantField< Ts >::from_lambda ( const char * key,
F  )
inlinestaticconstexpr

Definition at line 38 of file homeassistant_service.h.

Field Documentation

◆ fn

template<typename... Ts>
std::string(* esphome::api::HomeAssistantField< Ts >::fn) (const Ts &...)

Definition at line 36 of file homeassistant_service.h.

◆ key

template<typename... Ts>
const char* esphome::api::HomeAssistantField< Ts >::key

Definition at line 34 of file homeassistant_service.h.

◆ value

template<typename... Ts>
const char* esphome::api::HomeAssistantField< Ts >::value

Definition at line 35 of file homeassistant_service.h.


The documentation for this struct was generated from the following file: