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

#include <homeassistant_service.h>

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

Data Structures

struct  Flags
 

Public Types

using Field = HomeAssistantField<Ts...>
 

Public Member Functions

 HomeAssistantServiceCallAction (APIServer *parent, bool is_event, const Field *fields, uint8_t data_count, uint8_t data_template_count, uint8_t variables_count)
 fields is a codegen table: the action or event name (no key), then the data, data_template and variables entries.
 
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)
 
void stop_complex ()
 
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 Attributes

APIServer * parent_
 
const Field * fields_
 
uint8_t data_count_
 
uint8_t data_template_count_
 
uint8_t variables_count_
 
struct esphome::api::HomeAssistantServiceCallAction::Flags flags_
 
TemplatableValue< std::string, Ts... > response_template_ {}
 
Trigger< JsonObjectConst, Ts... > success_trigger_with_response_
 
Trigger< Ts... > success_trigger_
 
Trigger< std::string, Ts... > error_trigger_
 
- 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.
 

Additional Inherited Members

- 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_ ()
 
bool next_is_owner_ () const
 
Action * owner_ () const
 Only valid when next_is_owner_().
 
Action * chain_next_ () const
 
- Static Protected Member Functions inherited from esphome::Action< Ts... >
static Action * tag_owner (Action *owner)
 
- Static Protected Attributes inherited from esphome::Action< Ts... >
static constexpr uintptr_t OWNER_TAG
 

Detailed Description

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

Definition at line 84 of file homeassistant_service.h.

Member Typedef Documentation

◆ Field

template<typename... Ts>
using esphome::api::HomeAssistantServiceCallAction< Ts >::Field = HomeAssistantField<Ts...>

Definition at line 86 of file homeassistant_service.h.

Constructor & Destructor Documentation

◆ HomeAssistantServiceCallAction()

template<typename... Ts>
esphome::api::HomeAssistantServiceCallAction< Ts >::HomeAssistantServiceCallAction ( APIServer * parent,
bool is_event,
const Field * fields,
uint8_t data_count,
uint8_t data_template_count,
uint8_t variables_count )
inline

fields is a codegen table: the action or event name (no key), then the data, data_template and variables entries.

Definition at line 90 of file homeassistant_service.h.

Member Function Documentation

◆ get_error_trigger()

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

Definition at line 113 of file homeassistant_service.h.

◆ get_success_trigger()

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

Definition at line 112 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 110 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 116 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 101 of file homeassistant_service.h.

◆ set_wants_response()

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

Definition at line 107 of file homeassistant_service.h.

◆ set_wants_status()

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

Definition at line 106 of file homeassistant_service.h.

Field Documentation

◆ data_count_

template<typename... Ts>
uint8_t esphome::api::HomeAssistantServiceCallAction< Ts >::data_count_
protected

Definition at line 198 of file homeassistant_service.h.

◆ data_template_count_

template<typename... Ts>
uint8_t esphome::api::HomeAssistantServiceCallAction< Ts >::data_template_count_
protected

Definition at line 199 of file homeassistant_service.h.

◆ error_trigger_

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

Definition at line 214 of file homeassistant_service.h.

◆ fields_

template<typename... Ts>
const Field* esphome::api::HomeAssistantServiceCallAction< Ts >::fields_
protected

Definition at line 197 of file homeassistant_service.h.

◆ flags_

◆ parent_

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

Definition at line 196 of file homeassistant_service.h.

◆ response_template_

template<typename... Ts>
TemplatableValue<std::string, Ts...> esphome::api::HomeAssistantServiceCallAction< Ts >::response_template_ {}
protected

Definition at line 210 of file homeassistant_service.h.

◆ success_trigger_

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

Definition at line 213 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 211 of file homeassistant_service.h.

◆ variables_count_

template<typename... Ts>
uint8_t esphome::api::HomeAssistantServiceCallAction< Ts >::variables_count_
protected

Definition at line 200 of file homeassistant_service.h.


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