Timer/blinking and blackout buttons (#406)

*feat: timer blink

*feat: blackout

---------

Co-authored-by: Fabian Posenau <fabian@fphome.de>
Co-authored-by: cv <34649812+cpvalente@users.noreply.github.com>
This commit is contained in:
Fabian Posenau
2023-06-04 21:25:56 +02:00
committed by GitHub
parent 07737cc8b3
commit 5cb8020ab9
24 changed files with 196 additions and 66 deletions
@@ -32,6 +32,20 @@ export function dispatchFromAdapter(type: string, payload: unknown, source?: 'os
break;
}
case 'set-timer-blink': {
if (typeof payload !== 'undefined') {
messageService.setTimerBlink(Boolean(payload));
}
break;
}
case 'set-timer-blackout': {
if (typeof payload !== 'undefined') {
messageService.setTimerBlackout(Boolean(payload));
}
break;
}
case 'set-timer-message-text': {
if (typeof payload !== 'string') {
throw new Error(`Unable to parse payload: ${payload}`);