Send a command to a battery device. Immediate actions fire as soon as the connector picks them up; deferred actions (with start) fire at the requested time. The action is processed asynchronously and a webhook is sent on completion.
Documentation Index
Fetch the complete documentation index at: https://docs.amps.ai/llms.txt
Use this file to discover all available pages before exploring further.
The unique identifier for the battery device.
"device_abc123"
A single battery action plus optional onConflict strategy and sandbox controls.
Action variants describe what the API accepts. Per-device support varies; the commands map on GET /battery/{deviceId} shows which actions a specific device handles.
Actively charge the battery from grid or solar. target bounds the upper SoC; power caps the rate.
Execution shapes supported: immediate, scheduled, windowed.
{
"command": "charge",
"parameters": {
"target": { "value": 90, "unit": "percent" },
"power": { "value": 5, "unit": "kw" }
}
}cancel_and_replace cancels the active action before running this one; queue_after defers this one until the active action completes. Omit to receive 409 on conflict.
cancel_and_replace, queue_after Sandbox controls for testing error paths. Ignored in live environments.
Action accepted. For immediate actions, state: acknowledged means the connector has been dispatched; for deferred actions, state: scheduled and start carries the fire time.
Result of a push. For immediate actions, state reflects the connector handoff outcome. For deferred actions, state is scheduled and start carries the fire time.
Unique identifier for the action.
"act_abc123xyz"
Current state of the action. scheduled indicates a deferred action awaiting its fire time. cancelled is a terminal state reachable from scheduled via POST /actions/{actionId}/cancel.
acknowledged, completed, failed, scheduled, cancelled Type of action being performed.
battery:set_operation_mode Timestamp when the action was created.
Absolute firing instant for deferred actions, as an ISO 8601 timestamp. Null or absent for immediate actions.