17 void play(const Ts &...
x)
override {
18 if (this->current_temperature_.has_value()) {
19 this->parent_->set_current_temperature(this->current_temperature_.value(x...));
21 bool needs_call = this->target_temperature_.has_value() || this->mode_.has_value() || this->away_.has_value() ||
22 this->is_on_.has_value();
24 auto call = this->
parent_->make_call();
25 if (this->target_temperature_.has_value()) {
26 call.set_target_temperature(this->target_temperature_.value(
x...));
28 if (this->mode_.has_value()) {
29 call.set_mode(this->mode_.value(
x...));
31 if (this->away_.has_value()) {
32 call.set_away(this->away_.value(
x...));
34 if (this->is_on_.has_value()) {
35 call.set_on(this->is_on_.value(
x...));