more fixes

This commit is contained in:
J. Nick Koston
2026-02-27 16:22:59 -10:00
parent 3bca31ba9f
commit 39df0f6e51
12 changed files with 62 additions and 53 deletions
+1 -1
View File
@@ -66,5 +66,5 @@ def test_text_config_lamda_is_set(generate_main):
main_cpp = generate_main("tests/component_tests/text/test_text.yaml")
# Then
assert "it_4->set_template([]() -> esphome::optional<std::string> {" in main_cpp
assert "it_4->set_template([]() -> std::optional<std::string> {" in main_cpp
assert 'return std::string{"Hello"};' in main_cpp
+1 -1
View File
@@ -28,7 +28,7 @@ esphome:
# Test C++ API: set_template() with stateless lambda (no captures)
# NOTE: set_template() is not intended to be a public API, but we test it to ensure it doesn't break.
- lambda: |-
id(template_sens).set_template([]() -> esphome::optional<float> {
id(template_sens).set_template([]() -> std::optional<float> {
return 123.0f;
});