9 this->source_select_->add_on_state_callback([
this](
size_t index) { this->
publish_state(index); });
13 auto idx = this->source_select_->active_index();
18void CopySelect::dump_config() { LOG_SELECT(
"",
"Copy Select",
this); }
21 auto call = this->source_select_->make_call();
22 call.set_index(index);
virtual void setup()
Where the component's initialization should happen.
void control(size_t index) override
void publish_state(const std::string &state)
void set_options(const SelectOptions &options)
Runtime lists: the pointer list is copied, as before; the strings must still outlive the select.
ESPHOME_LOG_TAG(TAG, "copy.binary_sensor")