ESPHome 2026.1.0-dev
Loading...
Searching...
No Matches
esphome::api::ActionResponse Class Reference

#include <homeassistant_service.h>

Public Member Functions

 ActionResponse (bool success, const std::string &error_message)
 
 ActionResponse (bool success, const std::string &error_message, const uint8_t *data, size_t data_len)
 
bool is_success () const
 
const StringRefget_error_message () const
 
JsonObjectConst get_json () const
 

Protected Attributes

bool success_
 
StringRef error_message_
 
JsonDocument json_document_
 

Detailed Description

Definition at line 68 of file homeassistant_service.h.

Constructor & Destructor Documentation

◆ ActionResponse() [1/2]

esphome::api::ActionResponse::ActionResponse ( bool success,
const std::string & error_message )
inline

Definition at line 70 of file homeassistant_service.h.

◆ ActionResponse() [2/2]

esphome::api::ActionResponse::ActionResponse ( bool success,
const std::string & error_message,
const uint8_t * data,
size_t data_len )
inline

Definition at line 73 of file homeassistant_service.h.

Member Function Documentation

◆ get_error_message()

const StringRef & esphome::api::ActionResponse::get_error_message ( ) const
inline

Definition at line 83 of file homeassistant_service.h.

◆ get_json()

JsonObjectConst esphome::api::ActionResponse::get_json ( ) const
inline

Definition at line 87 of file homeassistant_service.h.

◆ is_success()

bool esphome::api::ActionResponse::is_success ( ) const
inline

Definition at line 81 of file homeassistant_service.h.

Field Documentation

◆ error_message_

StringRef esphome::api::ActionResponse::error_message_
protected

Definition at line 92 of file homeassistant_service.h.

◆ json_document_

JsonDocument esphome::api::ActionResponse::json_document_
protected

Definition at line 94 of file homeassistant_service.h.

◆ success_

bool esphome::api::ActionResponse::success_
protected

Definition at line 91 of file homeassistant_service.h.


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