Automation should use event store for data (#1962)

* fix: automation should use RuntimeStore for data

* add: aux timer template help
This commit is contained in:
Alex Christoffer Rasmussen
2026-03-02 11:54:46 -08:00
committed by GitHub
parent c1fcdf7065
commit 358ad79ae4
7 changed files with 87 additions and 56 deletions
@@ -54,6 +54,13 @@ const eventStaticPropertiesNext = [
'{{eventNext.delay}}',
];
const staticAuxProperties = (index: 1 | 2 | 3) => [
`{{auxtimer${index}.current}}`,
`{{auxtimer${index}.duration}}`,
`{{auxtimer${index}.playback}}`,
`{{auxtimer${index}.direction}}`,
];
/**
* Creates a it of possible autocomplete suggestions
* Based on RuntimeState
@@ -68,6 +75,9 @@ export function makeAutoCompleteList(customFields: CustomFields): string[] {
...Object.entries(customFields).map(([key]) => `{{eventNow.custom.${key}}}`),
...eventStaticPropertiesNext,
...Object.entries(customFields).map(([key]) => `{{eventNext.custom.${key}}}`),
...staticAuxProperties(1),
...staticAuxProperties(2),
...staticAuxProperties(3),
];
}