set_energy_mode
Switch a solar site's energy mode to self-consumption, AI price-driven trading, or time-boxed manual charge/discharge windows, so battery power follows your chosen strategy.
Instructions
CHANGES THE SITE (control scope). Confirm with the user before calling.
mode: selfConsumption (inverter default), amber_smart (Ai+, price-driven trading) or forced (manual windows). forced is always time-boxed: duration_minutes (default 240, max 1440); afterwards the server returns the site to the mode it had before. Shorthand for forced: action=charge|discharge with power_w and target_soc (charge) or stop_soc (discharge) builds one window starting now. Or pass explicit time_slots: [{type, start 'HH:MM', end 'HH:MM', target_soc|stop_soc, power, pace}] in site local time. variant picks the Ai+ engine when mode is amber_smart. The SOC floor and export limits cannot be overridden. Takes effect on the engine's next tick (about a minute).
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>",
"mode": "<mode>"
},
"name": "set_energy_mode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| action | No | ||
| power_w | No | ||
| site_id | Yes | ||
| variant | No | ||
| stop_soc | No | ||
| target_soc | No | ||
| time_slots | No | ||
| duration_minutes | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |