start to run a command later, or end to run it across a window. Times are the device’s local wall-clock time, so you never deal with UTC offsets.
Timing
Each command lists the shapes it accepts in its
execution array. Both windowed shapes need windowed. See Capabilities.
Schedule a window
Time format
Sendstart and end as local wall-clock time with no offset: YYYY-MM-DDTHH:MM:SS. Amps converts them using the device’s timezone.
Relative durations run that long after Amps receives the request. A window needs absolute times for both
start and end.
Times come back in UTC
Actions returnstart and end as UTC instants. A UK device in summer (BST, UTC+1):
Limits
All return
422. INVALID_TIME_WINDOW carries details.reason. A relative start doesn’t need the device’s timezone.
A scheduled or windowed command must carry its required parameters when you send it. Leaving one out returns 422 PARAMETER_REQUIRED, and no action is created. See Required parameters.
Daylight saving
end is compared with start in local time, so a window that crosses a clock change is valid as long as end is later on the wall clock.
When a window ends
Atend, Amps stops the command. On some devices that means sending idle, but never over a command that has already taken the device over. The stop is listed as its own action with command: "stop" and windowActionId naming the command. It sends its own settlement webhook.
The action’s endedAt records when the window closed. It stays null if the stop fails. To end a window early, see Replace a running window.
Cancel a scheduled action
An action can be cancelled while it’s stillscheduled. See Cancelling.
Only one action can be active or scheduled per device. A new push that collides returns 409 unless you set onConflict. See Conflicts.
Device schedules
To have a device run the program it already holds, such as a thermostat’s own schedule, send theauto.schedule command.
Coming soon. Recurring schedules that Amps sets and runs on the device.
Next steps
Push
The action body and lifecycle.
Conflicts
Handle collisions with scheduled actions.
Webhooks
Get notified when a scheduled action runs.
Battery cookbook
Charge in a cheap-rate window, and more.