ACTION_GET_BATTERY
Read the device’s battery level and charging status, returning them as workflow variables for automation decisions.
Instructions
读取电量和充电状态。输出:battery_level, battery_charging, battery_success, battery_error。battery_level 为 0–100;充满时 battery_charging 也为 true。。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "ACTION_GET_BATTERY"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| require | No | 执行后要求为 true 的变量名(如 click_success),不满足按出错处理 | |
| on_error | No | 节点出错时:skip=跳过继续(默认),stop=停止整个工作流 | |
| output_var | No | 电量另存到的变量名(battery_level 总会写) | |
| node_timeout_ms | No | 单节点超时毫秒,0=不限;默认 30 分钟 |