Skip to content

GenerativeUiComponentTimer

HTTP API schema

Port OS `Timer`, a custom component in the catalog `https://portoperatingsystem.com/a2ui/catalogs/tv/v1/catalog.json` (it extends the A2UI basic catalog; use that catalog id in `createSurface` when a surface contains a `Timer`). The TV ticks it locally every second, so one message is enough for a cooking timer; do not send an update per second. A `COUNTDOWN` timer needs `endsAt` and shows the time left, then `doneText` when it passes. A `COUNT_UP` timer needs `startedAt` and shows the time elapsed. It renders as ticking text at the headline size, in the brand color once done. Use absolute UTC times, not durations.

GenerativeUiComponentTimer fields

idstringRequired

Unique id in the surface.

minLength: 1

componentstringRequired

pattern: "^Timer$"

modestringRequired

COUNTDOWN counts down to `endsAt`; COUNT_UP counts up from `startedAt`.

Allowed values

  • COUNTDOWN
  • COUNT_UP
endsAtstring

When a COUNTDOWN timer reaches zero, as an RFC 3339 UTC time. Required for COUNTDOWN.

format: "date-time"

startedAtstring

When a COUNT_UP timer started, as an RFC 3339 UTC time. Required for COUNT_UP.

format: "date-time"

weightnumber

Share of the free space in the parent `Row` or `Column`.

minimum: 0

exclusiveMinimum: true

View source specification ↗