Developer
Log in

Actions

Timers

7 actions in the Timers group. Each is its own JSON-RPC method, and also runs through action.run.

timer.startStart timer

Starts a Timer, or carries on from where it was paused. A countdown that's done starts again from its starting time.

Keyscope: control

Parameters

  • sourcesourcerequired

    The Timer source, by id or name. Give its id or name.

    Choices in sources

Result

  • sourcestring (uuid)always

    The Timer's id.

  • timerTimeralways

    The Timer after it.

    Fields of timer
    • duration_msintegeralways

      Its starting time, in ms.

    • ends_at_msintegeralwayscan be null

      A running countdown: when it reaches zero (Unix ms); null otherwise.

    • finishedbooleanalways

      A countdown that reached zero.

    • modeTimerMode (string)always

      One of "countdown" "count_up"

    • runningbooleanalways

      It's counting.

    • started_at_msintegeralwayscan be null

      A running stopwatch: the moment it counts from (Unix ms); null otherwise.

    • textstringalways

      What it shows now ("1:04:59", or its words for zero once a countdown is done).

    • value_msintegeralways

      The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.

Live state

sources.items[source].timer object

The Timer: what it shows (text), whether it's running, the time it holds (value_ms) and, running, when a countdown ends (ends_at_ms) or a stopwatch started (started_at_ms). From the sources topic. How to read it.

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "timer.start",
  "params": {
    "source": "<source id or name>"
  }
}

In the SDKs

C#
Task<TimerStartResult> TimerStartAsync(TimerStartParams parameters, CancellationToken cancellationToken = default)
TypeScript
timerStart(params: TimerStartParams): Promise<TimerStartResult>
Python
async def timer_start(self, *, source: str) -> TimerStartResult
JSON Schema
JSON
{
  "params_schema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "source": {
        "description": "The Timer source, by id or name. Give its id or name.",
        "minLength": 1,
        "type": "string"
      }
    },
    "required": [
      "source"
    ],
    "type": "object"
  },
  "result_schema": {
    "additionalProperties": false,
    "properties": {
      "source": {
        "description": "The Timer's id.",
        "format": "uuid",
        "type": "string"
      },
      "timer": {
        "additionalProperties": false,
        "description": "The Timer after it.",
        "properties": {
          "duration_ms": {
            "description": "Its starting time, in ms.",
            "type": "integer"
          },
          "ends_at_ms": {
            "description": "A running countdown: when it reaches zero (Unix ms); null otherwise.",
            "type": [
              "integer",
              "null"
            ]
          },
          "finished": {
            "description": "A countdown that reached zero.",
            "type": "boolean"
          },
          "mode": {
            "enum": [
              "countdown",
              "count_up"
            ],
            "title": "TimerMode",
            "type": "string"
          },
          "running": {
            "description": "It's counting.",
            "type": "boolean"
          },
          "started_at_ms": {
            "description": "A running stopwatch: the moment it counts from (Unix ms); null otherwise.",
            "type": [
              "integer",
              "null"
            ]
          },
          "text": {
            "description": "What it shows now (\"1:04:59\", or its words for zero once a countdown is done).",
            "type": "string"
          },
          "value_ms": {
            "description": "The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.",
            "type": "integer"
          }
        },
        "required": [
          "mode",
          "text",
          "running",
          "finished",
          "value_ms",
          "duration_ms",
          "ends_at_ms",
          "started_at_ms"
        ],
        "title": "Timer",
        "type": "object"
      }
    },
    "required": [
      "source",
      "timer"
    ],
    "type": "object"
  }
}

timer.pausePause timer

Stops a Timer where it is.

Keyscope: control

Parameters

  • sourcesourcerequired

    The Timer source, by id or name. Give its id or name.

    Choices in sources

Result

  • sourcestring (uuid)always

    The Timer's id.

  • timerTimeralways

    The Timer after it.

    Fields of timer
    • duration_msintegeralways

      Its starting time, in ms.

    • ends_at_msintegeralwayscan be null

      A running countdown: when it reaches zero (Unix ms); null otherwise.

    • finishedbooleanalways

      A countdown that reached zero.

    • modeTimerMode (string)always

      One of "countdown" "count_up"

    • runningbooleanalways

      It's counting.

    • started_at_msintegeralwayscan be null

      A running stopwatch: the moment it counts from (Unix ms); null otherwise.

    • textstringalways

      What it shows now ("1:04:59", or its words for zero once a countdown is done).

    • value_msintegeralways

      The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.

Live state

sources.items[source].timer object

The Timer as it is now. From the sources topic. How to read it.

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "timer.pause",
  "params": {
    "source": "<source id or name>"
  }
}

In the SDKs

C#
Task<TimerPauseResult> TimerPauseAsync(TimerPauseParams parameters, CancellationToken cancellationToken = default)
TypeScript
timerPause(params: TimerPauseParams): Promise<TimerPauseResult>
Python
async def timer_pause(self, *, source: str) -> TimerPauseResult
JSON Schema
JSON
{
  "params_schema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "source": {
        "description": "The Timer source, by id or name. Give its id or name.",
        "minLength": 1,
        "type": "string"
      }
    },
    "required": [
      "source"
    ],
    "type": "object"
  },
  "result_schema": {
    "additionalProperties": false,
    "properties": {
      "source": {
        "description": "The Timer's id.",
        "format": "uuid",
        "type": "string"
      },
      "timer": {
        "additionalProperties": false,
        "description": "The Timer after it.",
        "properties": {
          "duration_ms": {
            "description": "Its starting time, in ms.",
            "type": "integer"
          },
          "ends_at_ms": {
            "description": "A running countdown: when it reaches zero (Unix ms); null otherwise.",
            "type": [
              "integer",
              "null"
            ]
          },
          "finished": {
            "description": "A countdown that reached zero.",
            "type": "boolean"
          },
          "mode": {
            "enum": [
              "countdown",
              "count_up"
            ],
            "title": "TimerMode",
            "type": "string"
          },
          "running": {
            "description": "It's counting.",
            "type": "boolean"
          },
          "started_at_ms": {
            "description": "A running stopwatch: the moment it counts from (Unix ms); null otherwise.",
            "type": [
              "integer",
              "null"
            ]
          },
          "text": {
            "description": "What it shows now (\"1:04:59\", or its words for zero once a countdown is done).",
            "type": "string"
          },
          "value_ms": {
            "description": "The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.",
            "type": "integer"
          }
        },
        "required": [
          "mode",
          "text",
          "running",
          "finished",
          "value_ms",
          "duration_ms",
          "ends_at_ms",
          "started_at_ms"
        ],
        "title": "Timer",
        "type": "object"
      }
    },
    "required": [
      "source",
      "timer"
    ],
    "type": "object"
  }
}

timer.toggleStart or pause timer

Pauses a running Timer, starts a stopped one.

Keyscope: control

Parameters

  • sourcesourcerequired

    The Timer source, by id or name. Give its id or name.

    Choices in sources

Result

  • sourcestring (uuid)always

    The Timer's id.

  • timerTimeralways

    The Timer after it.

    Fields of timer
    • duration_msintegeralways

      Its starting time, in ms.

    • ends_at_msintegeralwayscan be null

      A running countdown: when it reaches zero (Unix ms); null otherwise.

    • finishedbooleanalways

      A countdown that reached zero.

    • modeTimerMode (string)always

      One of "countdown" "count_up"

    • runningbooleanalways

      It's counting.

    • started_at_msintegeralwayscan be null

      A running stopwatch: the moment it counts from (Unix ms); null otherwise.

    • textstringalways

      What it shows now ("1:04:59", or its words for zero once a countdown is done).

    • value_msintegeralways

      The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.

Live state

sources.items[source].timer object

The Timer as it is now (running: whether it's counting). From the sources topic. How to read it.

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "timer.toggle",
  "params": {
    "source": "<source id or name>"
  }
}

In the SDKs

C#
Task<TimerToggleResult> TimerToggleAsync(TimerToggleParams parameters, CancellationToken cancellationToken = default)
TypeScript
timerToggle(params: TimerToggleParams): Promise<TimerToggleResult>
Python
async def timer_toggle(self, *, source: str) -> TimerToggleResult
JSON Schema
JSON
{
  "params_schema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "source": {
        "description": "The Timer source, by id or name. Give its id or name.",
        "minLength": 1,
        "type": "string"
      }
    },
    "required": [
      "source"
    ],
    "type": "object"
  },
  "result_schema": {
    "additionalProperties": false,
    "properties": {
      "source": {
        "description": "The Timer's id.",
        "format": "uuid",
        "type": "string"
      },
      "timer": {
        "additionalProperties": false,
        "description": "The Timer after it.",
        "properties": {
          "duration_ms": {
            "description": "Its starting time, in ms.",
            "type": "integer"
          },
          "ends_at_ms": {
            "description": "A running countdown: when it reaches zero (Unix ms); null otherwise.",
            "type": [
              "integer",
              "null"
            ]
          },
          "finished": {
            "description": "A countdown that reached zero.",
            "type": "boolean"
          },
          "mode": {
            "enum": [
              "countdown",
              "count_up"
            ],
            "title": "TimerMode",
            "type": "string"
          },
          "running": {
            "description": "It's counting.",
            "type": "boolean"
          },
          "started_at_ms": {
            "description": "A running stopwatch: the moment it counts from (Unix ms); null otherwise.",
            "type": [
              "integer",
              "null"
            ]
          },
          "text": {
            "description": "What it shows now (\"1:04:59\", or its words for zero once a countdown is done).",
            "type": "string"
          },
          "value_ms": {
            "description": "The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.",
            "type": "integer"
          }
        },
        "required": [
          "mode",
          "text",
          "running",
          "finished",
          "value_ms",
          "duration_ms",
          "ends_at_ms",
          "started_at_ms"
        ],
        "title": "Timer",
        "type": "object"
      }
    },
    "required": [
      "source",
      "timer"
    ],
    "type": "object"
  }
}

timer.resetReset timer

Puts a Timer back to its starting time, stopped.

Keyscope: control

Parameters

  • sourcesourcerequired

    The Timer source, by id or name. Give its id or name.

    Choices in sources

Result

  • sourcestring (uuid)always

    The Timer's id.

  • timerTimeralways

    The Timer after it.

    Fields of timer
    • duration_msintegeralways

      Its starting time, in ms.

    • ends_at_msintegeralwayscan be null

      A running countdown: when it reaches zero (Unix ms); null otherwise.

    • finishedbooleanalways

      A countdown that reached zero.

    • modeTimerMode (string)always

      One of "countdown" "count_up"

    • runningbooleanalways

      It's counting.

    • started_at_msintegeralwayscan be null

      A running stopwatch: the moment it counts from (Unix ms); null otherwise.

    • textstringalways

      What it shows now ("1:04:59", or its words for zero once a countdown is done).

    • value_msintegeralways

      The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.

Live state

sources.items[source].timer object

The Timer as it is now. From the sources topic. How to read it.

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "timer.reset",
  "params": {
    "source": "<source id or name>"
  }
}

In the SDKs

C#
Task<TimerResetResult> TimerResetAsync(TimerResetParams parameters, CancellationToken cancellationToken = default)
TypeScript
timerReset(params: TimerResetParams): Promise<TimerResetResult>
Python
async def timer_reset(self, *, source: str) -> TimerResetResult
JSON Schema
JSON
{
  "params_schema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "source": {
        "description": "The Timer source, by id or name. Give its id or name.",
        "minLength": 1,
        "type": "string"
      }
    },
    "required": [
      "source"
    ],
    "type": "object"
  },
  "result_schema": {
    "additionalProperties": false,
    "properties": {
      "source": {
        "description": "The Timer's id.",
        "format": "uuid",
        "type": "string"
      },
      "timer": {
        "additionalProperties": false,
        "description": "The Timer after it.",
        "properties": {
          "duration_ms": {
            "description": "Its starting time, in ms.",
            "type": "integer"
          },
          "ends_at_ms": {
            "description": "A running countdown: when it reaches zero (Unix ms); null otherwise.",
            "type": [
              "integer",
              "null"
            ]
          },
          "finished": {
            "description": "A countdown that reached zero.",
            "type": "boolean"
          },
          "mode": {
            "enum": [
              "countdown",
              "count_up"
            ],
            "title": "TimerMode",
            "type": "string"
          },
          "running": {
            "description": "It's counting.",
            "type": "boolean"
          },
          "started_at_ms": {
            "description": "A running stopwatch: the moment it counts from (Unix ms); null otherwise.",
            "type": [
              "integer",
              "null"
            ]
          },
          "text": {
            "description": "What it shows now (\"1:04:59\", or its words for zero once a countdown is done).",
            "type": "string"
          },
          "value_ms": {
            "description": "The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.",
            "type": "integer"
          }
        },
        "required": [
          "mode",
          "text",
          "running",
          "finished",
          "value_ms",
          "duration_ms",
          "ends_at_ms",
          "started_at_ms"
        ],
        "title": "Timer",
        "type": "object"
      }
    },
    "required": [
      "source",
      "timer"
    ],
    "type": "object"
  }
}

timer.addAdd time

Gives a Timer more time: a countdown lasts longer (one that ran out counts down again), a stopwatch jumps ahead. Shows at once.

Keyscope: control

Parameters

  • sourcesourcerequired

    The Timer source, by id or name. Give its id or name.

    Choices in sources

  • hoursnumberoptional

    Hours to add.

    0 to 10000 h

  • minutesnumberoptional

    Minutes to add (added to the hours and seconds).

    0 to 600000 min

  • secondsnumberoptional

    Seconds to add (added to the hours and minutes). Give at least one of the three.

    0 to 36000000 s

Result

  • sourcestring (uuid)always

    The Timer's id.

  • timerTimeralways

    The Timer after it.

    Fields of timer
    • duration_msintegeralways

      Its starting time, in ms.

    • ends_at_msintegeralwayscan be null

      A running countdown: when it reaches zero (Unix ms); null otherwise.

    • finishedbooleanalways

      A countdown that reached zero.

    • modeTimerMode (string)always

      One of "countdown" "count_up"

    • runningbooleanalways

      It's counting.

    • started_at_msintegeralwayscan be null

      A running stopwatch: the moment it counts from (Unix ms); null otherwise.

    • textstringalways

      What it shows now ("1:04:59", or its words for zero once a countdown is done).

    • value_msintegeralways

      The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.

Live state

sources.items[source].timer object

The Timer as it is now. From the sources topic. How to read it.

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "timer.add",
  "params": {
    "source": "<source id or name>"
  }
}

In the SDKs

C#
Task<TimerAddResult> TimerAddAsync(TimerAddParams parameters, CancellationToken cancellationToken = default)
TypeScript
timerAdd(params: TimerAddParams): Promise<TimerAddResult>
Python
async def timer_add(self, *, source: str, hours: float | None = None, minutes: float | None = None, seconds: float | None = None) -> TimerAddResult
JSON Schema
JSON
{
  "params_schema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "hours": {
        "description": "Hours to add.",
        "maximum": 10000.0,
        "minimum": 0.0,
        "type": "number"
      },
      "minutes": {
        "description": "Minutes to add (added to the hours and seconds).",
        "maximum": 600000.0,
        "minimum": 0.0,
        "type": "number"
      },
      "seconds": {
        "description": "Seconds to add (added to the hours and minutes). Give at least one of the three.",
        "maximum": 36000000.0,
        "minimum": 0.0,
        "type": "number"
      },
      "source": {
        "description": "The Timer source, by id or name. Give its id or name.",
        "minLength": 1,
        "type": "string"
      }
    },
    "required": [
      "source"
    ],
    "type": "object"
  },
  "result_schema": {
    "additionalProperties": false,
    "properties": {
      "source": {
        "description": "The Timer's id.",
        "format": "uuid",
        "type": "string"
      },
      "timer": {
        "additionalProperties": false,
        "description": "The Timer after it.",
        "properties": {
          "duration_ms": {
            "description": "Its starting time, in ms.",
            "type": "integer"
          },
          "ends_at_ms": {
            "description": "A running countdown: when it reaches zero (Unix ms); null otherwise.",
            "type": [
              "integer",
              "null"
            ]
          },
          "finished": {
            "description": "A countdown that reached zero.",
            "type": "boolean"
          },
          "mode": {
            "enum": [
              "countdown",
              "count_up"
            ],
            "title": "TimerMode",
            "type": "string"
          },
          "running": {
            "description": "It's counting.",
            "type": "boolean"
          },
          "started_at_ms": {
            "description": "A running stopwatch: the moment it counts from (Unix ms); null otherwise.",
            "type": [
              "integer",
              "null"
            ]
          },
          "text": {
            "description": "What it shows now (\"1:04:59\", or its words for zero once a countdown is done).",
            "type": "string"
          },
          "value_ms": {
            "description": "The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.",
            "type": "integer"
          }
        },
        "required": [
          "mode",
          "text",
          "running",
          "finished",
          "value_ms",
          "duration_ms",
          "ends_at_ms",
          "started_at_ms"
        ],
        "title": "Timer",
        "type": "object"
      }
    },
    "required": [
      "source",
      "timer"
    ],
    "type": "object"
  }
}

timer.removeRemove time

Takes time off a Timer, never below zero.

Keyscope: control

Parameters

  • sourcesourcerequired

    The Timer source, by id or name. Give its id or name.

    Choices in sources

  • hoursnumberoptional

    Hours to take off.

    0 to 10000 h

  • minutesnumberoptional

    Minutes to take off (added to the hours and seconds).

    0 to 600000 min

  • secondsnumberoptional

    Seconds to take off (added to the hours and minutes). Give at least one of the three.

    0 to 36000000 s

Result

  • sourcestring (uuid)always

    The Timer's id.

  • timerTimeralways

    The Timer after it.

    Fields of timer
    • duration_msintegeralways

      Its starting time, in ms.

    • ends_at_msintegeralwayscan be null

      A running countdown: when it reaches zero (Unix ms); null otherwise.

    • finishedbooleanalways

      A countdown that reached zero.

    • modeTimerMode (string)always

      One of "countdown" "count_up"

    • runningbooleanalways

      It's counting.

    • started_at_msintegeralwayscan be null

      A running stopwatch: the moment it counts from (Unix ms); null otherwise.

    • textstringalways

      What it shows now ("1:04:59", or its words for zero once a countdown is done).

    • value_msintegeralways

      The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.

Live state

sources.items[source].timer object

The Timer as it is now. From the sources topic. How to read it.

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "timer.remove",
  "params": {
    "source": "<source id or name>"
  }
}

In the SDKs

C#
Task<TimerRemoveResult> TimerRemoveAsync(TimerRemoveParams parameters, CancellationToken cancellationToken = default)
TypeScript
timerRemove(params: TimerRemoveParams): Promise<TimerRemoveResult>
Python
async def timer_remove(self, *, source: str, hours: float | None = None, minutes: float | None = None, seconds: float | None = None) -> TimerRemoveResult
JSON Schema
JSON
{
  "params_schema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "hours": {
        "description": "Hours to take off.",
        "maximum": 10000.0,
        "minimum": 0.0,
        "type": "number"
      },
      "minutes": {
        "description": "Minutes to take off (added to the hours and seconds).",
        "maximum": 600000.0,
        "minimum": 0.0,
        "type": "number"
      },
      "seconds": {
        "description": "Seconds to take off (added to the hours and minutes). Give at least one of the three.",
        "maximum": 36000000.0,
        "minimum": 0.0,
        "type": "number"
      },
      "source": {
        "description": "The Timer source, by id or name. Give its id or name.",
        "minLength": 1,
        "type": "string"
      }
    },
    "required": [
      "source"
    ],
    "type": "object"
  },
  "result_schema": {
    "additionalProperties": false,
    "properties": {
      "source": {
        "description": "The Timer's id.",
        "format": "uuid",
        "type": "string"
      },
      "timer": {
        "additionalProperties": false,
        "description": "The Timer after it.",
        "properties": {
          "duration_ms": {
            "description": "Its starting time, in ms.",
            "type": "integer"
          },
          "ends_at_ms": {
            "description": "A running countdown: when it reaches zero (Unix ms); null otherwise.",
            "type": [
              "integer",
              "null"
            ]
          },
          "finished": {
            "description": "A countdown that reached zero.",
            "type": "boolean"
          },
          "mode": {
            "enum": [
              "countdown",
              "count_up"
            ],
            "title": "TimerMode",
            "type": "string"
          },
          "running": {
            "description": "It's counting.",
            "type": "boolean"
          },
          "started_at_ms": {
            "description": "A running stopwatch: the moment it counts from (Unix ms); null otherwise.",
            "type": [
              "integer",
              "null"
            ]
          },
          "text": {
            "description": "What it shows now (\"1:04:59\", or its words for zero once a countdown is done).",
            "type": "string"
          },
          "value_ms": {
            "description": "The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.",
            "type": "integer"
          }
        },
        "required": [
          "mode",
          "text",
          "running",
          "finished",
          "value_ms",
          "duration_ms",
          "ends_at_ms",
          "started_at_ms"
        ],
        "title": "Timer",
        "type": "object"
      }
    },
    "required": [
      "source",
      "timer"
    ],
    "type": "object"
  }
}

timer.setSet time

Sets a Timer to exactly this much time, running or stopped as it was.

Keyscope: control

Parameters

  • sourcesourcerequired

    The Timer source, by id or name. Give its id or name.

    Choices in sources

  • hoursnumberoptional

    Hours it holds.

    0 to 10000 h

  • minutesnumberoptional

    Minutes it holds (added to the hours and seconds).

    0 to 600000 min

  • secondsnumberoptional

    Seconds it holds (added to the hours and minutes). Give at least one of the three.

    0 to 36000000 s

Result

  • sourcestring (uuid)always

    The Timer's id.

  • timerTimeralways

    The Timer after it.

    Fields of timer
    • duration_msintegeralways

      Its starting time, in ms.

    • ends_at_msintegeralwayscan be null

      A running countdown: when it reaches zero (Unix ms); null otherwise.

    • finishedbooleanalways

      A countdown that reached zero.

    • modeTimerMode (string)always

      One of "countdown" "count_up"

    • runningbooleanalways

      It's counting.

    • started_at_msintegeralwayscan be null

      A running stopwatch: the moment it counts from (Unix ms); null otherwise.

    • textstringalways

      What it shows now ("1:04:59", or its words for zero once a countdown is done).

    • value_msintegeralways

      The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.

Live state

sources.items[source].timer object

The Timer as it is now. From the sources topic. How to read it.

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "timer.set",
  "params": {
    "source": "<source id or name>"
  }
}

In the SDKs

C#
Task<TimerSetResult> TimerSetAsync(TimerSetParams parameters, CancellationToken cancellationToken = default)
TypeScript
timerSet(params: TimerSetParams): Promise<TimerSetResult>
Python
async def timer_set(self, *, source: str, hours: float | None = None, minutes: float | None = None, seconds: float | None = None) -> TimerSetResult
JSON Schema
JSON
{
  "params_schema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "hours": {
        "description": "Hours it holds.",
        "maximum": 10000.0,
        "minimum": 0.0,
        "type": "number"
      },
      "minutes": {
        "description": "Minutes it holds (added to the hours and seconds).",
        "maximum": 600000.0,
        "minimum": 0.0,
        "type": "number"
      },
      "seconds": {
        "description": "Seconds it holds (added to the hours and minutes). Give at least one of the three.",
        "maximum": 36000000.0,
        "minimum": 0.0,
        "type": "number"
      },
      "source": {
        "description": "The Timer source, by id or name. Give its id or name.",
        "minLength": 1,
        "type": "string"
      }
    },
    "required": [
      "source"
    ],
    "type": "object"
  },
  "result_schema": {
    "additionalProperties": false,
    "properties": {
      "source": {
        "description": "The Timer's id.",
        "format": "uuid",
        "type": "string"
      },
      "timer": {
        "additionalProperties": false,
        "description": "The Timer after it.",
        "properties": {
          "duration_ms": {
            "description": "Its starting time, in ms.",
            "type": "integer"
          },
          "ends_at_ms": {
            "description": "A running countdown: when it reaches zero (Unix ms); null otherwise.",
            "type": [
              "integer",
              "null"
            ]
          },
          "finished": {
            "description": "A countdown that reached zero.",
            "type": "boolean"
          },
          "mode": {
            "enum": [
              "countdown",
              "count_up"
            ],
            "title": "TimerMode",
            "type": "string"
          },
          "running": {
            "description": "It's counting.",
            "type": "boolean"
          },
          "started_at_ms": {
            "description": "A running stopwatch: the moment it counts from (Unix ms); null otherwise.",
            "type": [
              "integer",
              "null"
            ]
          },
          "text": {
            "description": "What it shows now (\"1:04:59\", or its words for zero once a countdown is done).",
            "type": "string"
          },
          "value_ms": {
            "description": "The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.",
            "type": "integer"
          }
        },
        "required": [
          "mode",
          "text",
          "running",
          "finished",
          "value_ms",
          "duration_ms",
          "ends_at_ms",
          "started_at_ms"
        ],
        "title": "Timer",
        "type": "object"
      }
    },
    "required": [
      "source",
      "timer"
    ],
    "type": "object"
  }
}

to open · ↑ ↓ to move · Esc to close