Discharge plan
plan_dischargeCalculates when and how hard to discharge a battery: sell energy in best-paid intervals above reserve SOC, or discharge steadily to hit a target SOC by a set time.
Instructions
Work out when and how hard to discharge. Calculates only: nothing is applied, a read key is enough.
goal='best_price' ("sell at the best prices tonight"): the best-paid Amber intervals between window_start and window_end for the energy above reserve_soc, optionally only above min_sell_c. Returns the intervals, expected revenue and the average it beats.
goal='target_soc' ("keep 30% for 9 pm"): one steady discharge from window_start (default now) that reaches target_soc at window_end; needs both of those; prices play no part. Returns power_w.
Both return proposed time_slots: apply with set_energy_mode(mode='forced', time_slots=...) after the user agrees. On hosts with cards the plan's Apply button is the user's yes.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"site_id": "<site_id>",
"goal": "<goal>"
},
"name": "plan_discharge"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | Yes | best_price = sell in the best-paid Amber intervals; target_soc = one steady discharge that ends at a chosen SOC. | |
| site_id | Yes | Site id from list_sites: vendor:station_id, e.g. sungrow:1445844. | |
| min_sell_c | No | best_price only: sell only in intervals paying more than this, c/kWh. | |
| target_soc | No | target_soc only, and required there: the SOC to be at by window_end, 0 to 100. | |
| window_end | No | HH:MM site local. best_price: where the selling window ends. target_soc: the time to be at target_soc (required). | |
| reserve_soc | No | best_price only: the SOC to keep, 0 to 100; only energy above it is sold. | |
| window_start | No | HH:MM site local. best_price: where the selling window starts. target_soc: when to start discharging (omitted = now). | |
| battery_capacity_kwh | No | Battery capacity to calculate with, kWh. Normally omitted: the site's own figure is used. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||