Fix ontime aux actions (#1684)

* switch to base ui

* ensure all action types is part of the valitation

* update test

* atempt to do it in the base-ui way

* fix fixing

* allow undefide visible on set timer message

* fix set time not showing

* correct time data for aux set automation

---------

Co-authored-by: Carlos Valente <carlosvalente@pm.me>
This commit is contained in:
Alex Christoffer Rasmussen
2025-07-09 13:14:23 +02:00
committed by GitHub
parent 8d68a4554d
commit 4d359445a7
12 changed files with 141 additions and 89 deletions
@@ -46,17 +46,17 @@ describe('parseOutput', () => {
it('parses a valid payload', () => {
const auxStart = {
type: 'ontime',
action: 'aux-start',
action: 'aux1-start',
};
expect(parseOutput(auxStart)).toStrictEqual(auxStart);
const auxStop = {
type: 'ontime',
action: 'aux-stop',
action: 'aux3-stop',
};
expect(parseOutput(auxStop)).toStrictEqual(auxStop);
const auxPause = {
type: 'ontime',
action: 'aux-pause',
action: 'aux2-pause',
};
expect(parseOutput(auxPause)).toStrictEqual(auxPause);
});
@@ -65,12 +65,12 @@ describe('parseOutput', () => {
expect(
parseOutput({
type: 'ontime',
action: 'aux-start',
action: 'aux1-start',
time: 10,
}),
).toStrictEqual({
type: 'ontime',
action: 'aux-start',
action: 'aux1-start',
});
});
@@ -88,7 +88,7 @@ describe('parseOutput', () => {
type: 'ontime',
action: 'message-set',
text: 'test',
visible: 'true',
visible: true,
}),
).toMatchObject({
text: 'test',
@@ -99,7 +99,7 @@ describe('parseOutput', () => {
type: 'ontime',
action: 'message-set',
text: '',
visible: 'false',
visible: false,
}),
).toMatchObject({
text: undefined,
@@ -110,7 +110,6 @@ describe('parseOutput', () => {
type: 'ontime',
action: 'message-set',
text: '',
visible: '',
}),
).toMatchObject({
text: undefined,