feat: ontime actions in automation

This commit is contained in:
Carlos Valente
2025-02-18 12:00:31 +01:00
committed by Carlos Valente
parent 636f78e21e
commit 5fb30c75c4
13 changed files with 611 additions and 71 deletions
@@ -1,4 +1,4 @@
import { FilterRule, MaybeNumber } from 'ontime-types';
import { FilterRule, MaybeNumber, OntimeAction } from 'ontime-types';
import { millisToString, removeLeadingZero, splitWhitespace, getPropertyFromPath } from 'ontime-utils';
import type { OscArgOrArrayInput, OscArgInput } from 'osc-min';
@@ -12,6 +12,10 @@ export function isFilterRule(value: string): value is FilterRule {
return value === 'all' || value === 'any';
}
export function isOntimeActionAction(value: string): value is OntimeAction['action'] {
return ['aux-start', 'aux-stop', 'aux-pause', 'aux-set', 'message-set', 'message-secondary'].includes(value);
}
function toOscValue(argString: string): OscArgInput {
const argAsNum = Number(argString);
// NOTE: number like: 1 2.0 33333