Presets
Ready-made loads: ask when to run one with a single URL.
| Preset | Load | Kind |
|---|---|---|
laundry | A washing machine program: 2 hours, 1.5 kWh | Continuous |
sauna | Heating an electric sauna: about an hour to warm up and two hours of bathing, 8 kWh | Continuous |
ev-charging | Charging an electric vehicle: 44 kWh at 11 kW | Pausable |
A continuous load runs from start to end without a break, and the answer is up to three runs that do not overlap, cheapest first. A pausable load can stop and go on later, and the answer is the single cheapest plan, in one or more blocks. GET /v1/electricity/plans/presets lists the presets with their parameters.
Example: the washing machine
Request
curl "https://milloin.xyz/api/v1/electricity/plans/presets/laundry?limit=1"Response
{
"request": {
"pausable": false, "durationHours": 2, "energyKwh": 1.5,
"earliestStart": "2026-10-12T08:15:00.000Z", "latestEnd": "2026-10-13T21:00:00.000Z",
"limit": 1, "resolution": "15min", "preset": "laundry"
},
"meta": {
"priceUnit": "c/kWh", "currency": "EUR", "vatIncluded": true, "vatPercent": 25.5, "area": "FI",
"pricesUntil": "2026-10-13T21:00:00.000Z", "tomorrowPublished": true,
"nextPricesExpectedAt": "2026-10-13T11:00:00.000Z"
},
"activeNow": false,
"nextChangeAt": "2026-10-13T01:00:00.000Z",
"startNow": {
"startTime": "2026-10-12T08:15:00.000Z", "endTime": "2026-10-12T10:15:00.000Z",
"priceAvg": 11.13, "category": "EXPENSIVE", "costCents": 16.69
},
"plans": [
{
"startTime": "2026-10-13T01:00:00.000Z", "endTime": "2026-10-13T03:00:00.000Z",
"priceAvg": 2, "category": "VERY_CHEAP", "costCents": 3, "savingsCents": 13.69,
"activeNow": false, "nextChangeAt": "2026-10-13T01:00:00.000Z",
"blocks": [
{ "startTime": "2026-10-13T01:00:00.000Z", "endTime": "2026-10-13T03:00:00.000Z", "energyKwh": 1.5 }
]
}
]
}plans[0]is the cheapest run: start the program at itsstartTime.costCentsis the cost of the energy,savingsCentswhat it saves compared with starting now (startNow).activeNowandnextChangeAttell a device whether to be on now and when to switch next.- The search runs from now to the last published price,
meta.pricesUntil. Tomorrow's prices arrive at about 14:00 Finnish time; ask again aftermeta.nextPricesExpectedAtfor a plan that can use them.
Overriding a preset
Any GET /v1/electricity/plans parameter replaces the preset's. Charge 30 kWh before 7:00 tomorrow morning:
curl "https://milloin.xyz/api/v1/electricity/plans/presets/ev-charging?energyKwh=30&latestEnd=2026-10-13T07:00:00%2B03:00" A durationHours replaces the preset's power, and a maxPowerKw its duration. The other parameters are in Custom plans.