36 template<
typename T>
void set_service(T service) { this->service_ = service; }
50 resp.
service = this->service_.value(
x...);
52 for (
auto &it : this->data_) {
55 kv.
value = it.value.value(
x...);
56 resp.
data.push_back(kv);
58 for (
auto &it : this->data_template_) {
61 kv.
value = it.value.value(
x...);
64 for (
auto &it : this->variables_) {
67 kv.
value = it.value.value(
x...);
70 this->parent_->send_homeassistant_service_call(resp);
TemplatableStringValue(F value)
std::vector< TemplatableKeyValuePair< Ts... > > data_
TemplatableStringValue< Ts... > value
std::vector< TemplatableKeyValuePair< Ts... > > data_template_
typename std::enable_if< B, T >::type enable_if_t
TemplatableStringValue(F f)
std::string value(X... x)
HomeAssistantServiceCallAction(APIServer *parent, bool is_event)
std::vector< HomeassistantServiceMap > variables
void play(Ts... x) override
std::vector< HomeassistantServiceMap > data_template
TemplatableKeyValuePair(std::string key, T value)
void add_data_template(std::string key, T value)
void add_variable(std::string key, T value)
void add_data(std::string key, T value)
std::string to_string(int value)
Implementation of SPI Controller mode.
void set_service(T service)
std::vector< TemplatableKeyValuePair< Ts... > > variables_
std::vector< HomeassistantServiceMap > data