Push battery action
Send a command to a battery device. Immediate actions fire as soon as the platform dispatches them; deferred actions (with start) fire at the requested time. The action is processed asynchronously and a webhook is sent on completion.
Authorizations
Path Parameters
The unique identifier for the battery device.
"device_abc123"
Body
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.
A canonical battery command. charge/discharge move energy to/from the battery (bounded by target, rate-capped by power); idle pauses; the auto.* modes declare an optimisation intent.
{
"command": "charge",
"parameters": {
"target": { "value": 90, "unit": "percent" },
"power": { "value": 5, "unit": "kw" }
}
}{
"command": "charge",
"start": "2026-05-08T22:00:00",
"parameters": {
"target": { "value": 100, "unit": "percent" }
}
}{
"command": "discharge",
"start": "2026-05-08T17:00:00",
"end": "2026-05-08T20:00:00",
"parameters": {
"target": { "value": 30, "unit": "percent" }
}
}{ "command": "auto.balanced" }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.
Response
Action accepted. For immediate actions, state: acknowledged means the command has been dispatched; for deferred actions, state: scheduled and start carries the fire time.
Always true for success responses.
Result of a push. Mirrors the dispatch (command + parameters + deviceType) and carries links.self to track the action. For immediate actions, state reflects the dispatch outcome. For deferred actions, state is scheduled, start carries the fire time, and end the window close when a window was requested.
Metadata attached to every response: the request identifier, the serving environment, the build timestamp, and the server-side latency.