create_schedule
Create or replace a device schedule slot (0-4) to fire an on command and off command at specified Unix times; requires permission for both commands.
Instructions
Create or replace one of a device's schedule slots (0-4), firing onCommand at onTs and offCommand at offTs. Rejected if the calling key has no permission for either command.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| onTs | Yes | Unix seconds to fire onCommand. | |
| slot | Yes | Which of the device's 5 schedule slots (0-4) to use. | |
| label | No | Short label shown on the dashboard, max 7 characters. | |
| offTs | Yes | Unix seconds to fire offCommand. | |
| enabled | No | ||
| deviceId | Yes | The device's public id, e.g. dev_a1b2c3. | |
| onCommand | No | Defaults to { command: "ON" }. | |
| offCommand | No | Defaults to { command: "OFF" }. |