feat: implement multiple aux timers

This commit is contained in:
Carlos Valente
2025-06-24 07:20:53 +02:00
committed by Carlos Valente
parent d1c58712ae
commit bf8ed8d017
33 changed files with 748 additions and 297 deletions
@@ -8,18 +8,32 @@ export function toOntimeAction(action: OntimeAction) {
const actionType = action.action;
switch (actionType) {
// Aux timer actions
case 'aux-start':
auxTimerService.start();
break;
case 'aux-stop':
auxTimerService.stop();
break;
case 'aux-pause':
auxTimerService.pause();
break;
case 'aux-set': {
auxTimerService.setTime(action.time);
break;
case 'aux1-start':
return auxTimerService.start(1);
case 'aux1-stop':
return auxTimerService.stop(1);
case 'aux1-pause':
return auxTimerService.pause(1);
case 'aux1-set': {
return auxTimerService.setTime(action.time, 1);
}
case 'aux2-start':
return auxTimerService.start(2);
case 'aux2-stop':
return auxTimerService.stop(2);
case 'aux2-pause':
return auxTimerService.pause(2);
case 'aux2-set': {
return auxTimerService.setTime(action.time, 2);
}
case 'aux3-start':
return auxTimerService.start(3);
case 'aux3-stop':
return auxTimerService.stop(3);
case 'aux3-pause':
return auxTimerService.pause(3);
case 'aux3-set': {
return auxTimerService.setTime(action.time, 3);
}
// Message actions