Pass timer tick vector as const ref through automation to avoid copy

This commit is contained in:
J. Nick Koston
2026-02-08 02:26:22 -06:00
parent 86fee6e4af
commit 9add30b900
@@ -371,7 +371,12 @@ async def to_code(config):
if on_timer_tick := config.get(CONF_ON_TIMER_TICK):
await automation.build_automation(
var.get_timer_tick_trigger(),
[(cg.std_vector.template(Timer), "timers")],
[
(
cg.std_vector.template(Timer).operator("const").operator("ref"),
"timers",
)
],
on_timer_tick,
)
has_timers = True