1
0
mirror of https://github.com/esphome/esphome.git synced 2026-02-08 00:31:58 +00:00

[template] Add additional tests for template select (#13741)

This commit is contained in:
J. Nick Koston
2026-02-03 12:13:03 +01:00
committed by GitHub
parent b3e09e5c68
commit c027d9116f

View File

@@ -296,6 +296,16 @@ select:
// Migration guide: Store in std::string // Migration guide: Store in std::string
std::string stored_option(id(template_select).current_option()); std::string stored_option(id(template_select).current_option());
ESP_LOGI("test", "Stored: %s", stored_option.c_str()); ESP_LOGI("test", "Stored: %s", stored_option.c_str());
- platform: template
id: template_select_with_action
name: "Template select with action"
options:
- option_a
- option_b
set_action:
- logger.log:
format: "Selected: %s"
args: ["x.c_str()"]
lock: lock:
- platform: template - platform: template