mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-19 04:33:27 +02:00
Select enhancement (#3423)
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
This commit is contained in:
@@ -61,8 +61,10 @@ void Controller::setup_controller(bool include_internal) {
|
||||
#endif
|
||||
#ifdef USE_SELECT
|
||||
for (auto *obj : App.get_selects()) {
|
||||
if (include_internal || !obj->is_internal())
|
||||
obj->add_on_state_callback([this, obj](const std::string &state) { this->on_select_update(obj, state); });
|
||||
if (include_internal || !obj->is_internal()) {
|
||||
obj->add_on_state_callback(
|
||||
[this, obj](const std::string &state, size_t index) { this->on_select_update(obj, state, index); });
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef USE_LOCK
|
||||
|
||||
Reference in New Issue
Block a user