[api] Keep Home Assistant action fields in a flash table (#20237)

This commit is contained in:
J. Nick Koston
2026-10-07 10:09:49 -10:00
committed by GitHub
parent 3296bccd3c
commit 6db2e781ce
7 changed files with 268 additions and 262 deletions
@@ -37,7 +37,7 @@ api:
args: [input_number]
# Test that int lambdas still work correctly with to_string
# The TemplatableStringValue should automatically convert int to string
# Home Assistant action lambdas convert an int result to a string
- homeassistant.event:
event: esphome.test_int_lambda
data:
@@ -54,7 +54,7 @@ api:
args: [input_float]
# Test that float lambdas still work correctly with to_string
# The TemplatableStringValue should automatically convert float to string
# Home Assistant action lambdas convert a float result to a string
- homeassistant.event:
event: esphome.test_float_lambda
data:
+2 -2
View File
@@ -1,4 +1,4 @@
"""Integration test for TemplatableStringValue with string lambdas."""
"""Integration test for Home Assistant action lambdas returning strings and numbers."""
from __future__ import annotations
@@ -16,7 +16,7 @@ async def test_api_string_lambda(
run_compiled: RunCompiledFunction,
api_client_connected: APIClientConnectedFactory,
) -> None:
"""Test TemplatableStringValue works with lambdas that return different types."""
"""Test Home Assistant action lambdas that return different types are sent as strings."""
loop = asyncio.get_running_loop()
# Track log messages for all four service calls