mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-03-01 03:51:36 +01:00
fix mistake in example for .active_index() (#2499)
This commit is contained in:
parent
b6fa6d9316
commit
a7e8ab3b7c
@ -299,7 +299,7 @@ advanced stuff (see the full API Reference for more info).
|
||||
|
||||
auto index = id(my_select).active_index();
|
||||
if (index.has_value()) {
|
||||
ESP_LOGI("main", "Option at index %d is active", index);
|
||||
ESP_LOGI("main", "Option at index %d is active", index.value());
|
||||
} else {
|
||||
ESP_LOGI("main", "No option is active");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user