ESPHome 2026.3.0-dev
Loading...
Searching...
No Matches
esphome::api::HomeAssistantServiceCallAction< Ts > Class Template Reference

#include <homeassistant_service.h>

Inheritance diagram for esphome::api::HomeAssistantServiceCallAction< Ts >:
esphome::Action< Ts... >

Data Structures

struct  Flags
 

Public Member Functions

 HomeAssistantServiceCallAction (APIServer *parent, bool is_event)
 
template<typename T >
void set_service (T service)
 
void init_data (size_t count)
 
void init_data_template (size_t count)
 
void init_variables (size_t count)
 
template<typename V >
void add_data (const char *key, V &&value)
 
template<typename V >
void add_data_template (const char *key, V &&value)
 
template<typename V >
void add_variable (const char *key, V &&value)
 
template<typename V >
void add_data (const __FlashStringHelper *key, V &&value)
 
template<typename V >
void add_data_template (const __FlashStringHelper *key, V &&value)
 
template<typename V >
void add_variable (const __FlashStringHelper *key, V &&value)
 
template<typename T >
void set_response_template (T response_template)
 
void set_wants_status ()
 
void set_wants_response ()
 
Trigger< JsonObjectConst, Ts... > * get_success_trigger_with_response ()
 
Trigger< Ts... > * get_success_trigger ()
 
Trigger< std::string, Ts... > * get_error_trigger ()
 
void play (const Ts &...x) override
 
- Public Member Functions inherited from esphome::Action< Ts... >
virtual void play_complex (const Ts &...x)
 
virtual void stop_complex ()
 
virtual bool is_running ()
 Check if this or any of the following actions are currently running.
 
int num_running_total ()
 The total number of actions that are currently running in this plus any of the following actions in the chain.
 

Protected Member Functions

template<typename V >
void add_kv_ (FixedVector< TemplatableKeyValuePair< Ts... > > &vec, const char *key, V &&value)
 
- Protected Member Functions inherited from esphome::Action< Ts... >
void play_next_ (const Ts &...x)
 
void play_next_tuple_ (const std::tuple< Ts... > &tuple, std::index_sequence< S... >)
 
void play_next_tuple_ (const std::tuple< Ts... > &tuple)
 
virtual void stop ()
 
void stop_next_ ()
 
bool is_running_next_ ()
 

Static Protected Member Functions

template<typename VectorType , typename SourceType >
static void populate_service_map (VectorType &dest, SourceType &source, FixedVector< std::string > &value_storage, Ts... x)
 

Protected Attributes

APIServerparent_
 
TemplatableStringValue< Ts... > service_ {}
 
FixedVector< TemplatableKeyValuePair< Ts... > > data_
 
FixedVector< TemplatableKeyValuePair< Ts... > > data_template_
 
FixedVector< TemplatableKeyValuePair< Ts... > > variables_
 
TemplatableStringValue< Ts... > response_template_ {""}
 
Trigger< JsonObjectConst, Ts... > success_trigger_with_response_
 
Trigger< Ts... > success_trigger_
 
Trigger< std::string, Ts... > error_trigger_
 
struct esphome::api::HomeAssistantServiceCallAction::Flags flags_
 
- Protected Attributes inherited from esphome::Action< Ts... >
friend ActionList< Ts... >
 
Action< Ts... > * next_
 
int num_running_
 The number of instances of this sequence in the list of actions that is currently being executed.
 

Detailed Description

template<typename... Ts>
class esphome::api::HomeAssistantServiceCallAction< Ts >

Definition at line 106 of file homeassistant_service.h.

Constructor & Destructor Documentation

◆ HomeAssistantServiceCallAction()

template<typename... Ts>
esphome::api::HomeAssistantServiceCallAction< Ts >::HomeAssistantServiceCallAction ( APIServer * parent,
bool is_event )
inlineexplicit

Definition at line 108 of file homeassistant_service.h.

Member Function Documentation

◆ add_data() [1/2]

template<typename... Ts>
template<typename V >
void esphome::api::HomeAssistantServiceCallAction< Ts >::add_data ( const __FlashStringHelper * key,
V && value )
inline

Definition at line 136 of file homeassistant_service.h.

◆ add_data() [2/2]

template<typename... Ts>
template<typename V >
void esphome::api::HomeAssistantServiceCallAction< Ts >::add_data ( const char * key,
V && value )
inline

Definition at line 123 of file homeassistant_service.h.

◆ add_data_template() [1/2]

template<typename... Ts>
template<typename V >
void esphome::api::HomeAssistantServiceCallAction< Ts >::add_data_template ( const __FlashStringHelper * key,
V && value )
inline

Definition at line 139 of file homeassistant_service.h.

◆ add_data_template() [2/2]

template<typename... Ts>
template<typename V >
void esphome::api::HomeAssistantServiceCallAction< Ts >::add_data_template ( const char * key,
V && value )
inline

Definition at line 126 of file homeassistant_service.h.

◆ add_kv_()

template<typename... Ts>
template<typename V >
void esphome::api::HomeAssistantServiceCallAction< Ts >::add_kv_ ( FixedVector< TemplatableKeyValuePair< Ts... > > & vec,
const char * key,
V && value )
inlineprotected

Definition at line 227 of file homeassistant_service.h.

◆ add_variable() [1/2]

template<typename... Ts>
template<typename V >
void esphome::api::HomeAssistantServiceCallAction< Ts >::add_variable ( const __FlashStringHelper * key,
V && value )
inline

Definition at line 142 of file homeassistant_service.h.

◆ add_variable() [2/2]

template<typename... Ts>
template<typename V >
void esphome::api::HomeAssistantServiceCallAction< Ts >::add_variable ( const char * key,
V && value )
inline

Definition at line 129 of file homeassistant_service.h.

◆ get_error_trigger()

template<typename... Ts>
Trigger< std::string, Ts... > * esphome::api::HomeAssistantServiceCallAction< Ts >::get_error_trigger ( )
inline

Definition at line 160 of file homeassistant_service.h.

◆ get_success_trigger()

template<typename... Ts>
Trigger< Ts... > * esphome::api::HomeAssistantServiceCallAction< Ts >::get_success_trigger ( )
inline

Definition at line 159 of file homeassistant_service.h.

◆ get_success_trigger_with_response()

template<typename... Ts>
Trigger< JsonObjectConst, Ts... > * esphome::api::HomeAssistantServiceCallAction< Ts >::get_success_trigger_with_response ( )
inline

Definition at line 157 of file homeassistant_service.h.

◆ init_data()

template<typename... Ts>
void esphome::api::HomeAssistantServiceCallAction< Ts >::init_data ( size_t count)
inline

Definition at line 116 of file homeassistant_service.h.

◆ init_data_template()

template<typename... Ts>
void esphome::api::HomeAssistantServiceCallAction< Ts >::init_data_template ( size_t count)
inline

Definition at line 117 of file homeassistant_service.h.

◆ init_variables()

template<typename... Ts>
void esphome::api::HomeAssistantServiceCallAction< Ts >::init_variables ( size_t count)
inline

Definition at line 118 of file homeassistant_service.h.

◆ play()

template<typename... Ts>
void esphome::api::HomeAssistantServiceCallAction< Ts >::play ( const Ts &... x)
inlineoverridevirtual

Implements esphome::Action< Ts... >.

Definition at line 163 of file homeassistant_service.h.

◆ populate_service_map()

template<typename... Ts>
template<typename VectorType , typename SourceType >
static void esphome::api::HomeAssistantServiceCallAction< Ts >::populate_service_map ( VectorType & dest,
SourceType & source,
FixedVector< std::string > & value_storage,
Ts... x )
inlinestaticprotected

Definition at line 234 of file homeassistant_service.h.

◆ set_response_template()

template<typename... Ts>
template<typename T >
void esphome::api::HomeAssistantServiceCallAction< Ts >::set_response_template ( T response_template)
inline

Definition at line 148 of file homeassistant_service.h.

◆ set_service()

template<typename... Ts>
template<typename T >
void esphome::api::HomeAssistantServiceCallAction< Ts >::set_service ( T service)
inline

Definition at line 112 of file homeassistant_service.h.

◆ set_wants_response()

template<typename... Ts>
void esphome::api::HomeAssistantServiceCallAction< Ts >::set_wants_response ( )
inline

Definition at line 154 of file homeassistant_service.h.

◆ set_wants_status()

template<typename... Ts>
void esphome::api::HomeAssistantServiceCallAction< Ts >::set_wants_status ( )
inline

Definition at line 153 of file homeassistant_service.h.

Field Documentation

◆ data_

template<typename... Ts>
FixedVector<TemplatableKeyValuePair<Ts...> > esphome::api::HomeAssistantServiceCallAction< Ts >::data_
protected

Definition at line 290 of file homeassistant_service.h.

◆ data_template_

template<typename... Ts>
FixedVector<TemplatableKeyValuePair<Ts...> > esphome::api::HomeAssistantServiceCallAction< Ts >::data_template_
protected

Definition at line 291 of file homeassistant_service.h.

◆ error_trigger_

template<typename... Ts>
Trigger<std::string, Ts...> esphome::api::HomeAssistantServiceCallAction< Ts >::error_trigger_
protected

Definition at line 299 of file homeassistant_service.h.

◆ flags_

◆ parent_

template<typename... Ts>
APIServer* esphome::api::HomeAssistantServiceCallAction< Ts >::parent_
protected

Definition at line 288 of file homeassistant_service.h.

◆ response_template_

template<typename... Ts>
TemplatableStringValue<Ts...> esphome::api::HomeAssistantServiceCallAction< Ts >::response_template_ {""}
protected

Definition at line 295 of file homeassistant_service.h.

◆ service_

template<typename... Ts>
TemplatableStringValue<Ts...> esphome::api::HomeAssistantServiceCallAction< Ts >::service_ {}
protected

Definition at line 289 of file homeassistant_service.h.

◆ success_trigger_

template<typename... Ts>
Trigger<Ts...> esphome::api::HomeAssistantServiceCallAction< Ts >::success_trigger_
protected

Definition at line 298 of file homeassistant_service.h.

◆ success_trigger_with_response_

template<typename... Ts>
Trigger<JsonObjectConst, Ts...> esphome::api::HomeAssistantServiceCallAction< Ts >::success_trigger_with_response_
protected

Definition at line 296 of file homeassistant_service.h.

◆ variables_

template<typename... Ts>
FixedVector<TemplatableKeyValuePair<Ts...> > esphome::api::HomeAssistantServiceCallAction< Ts >::variables_
protected

Definition at line 292 of file homeassistant_service.h.


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