Cheapest window
find_cheapest_windowThe cheapest (or lowest-carbon) run of duration_hours starting from the next half hour and finishing by the next finish_by – when to set a washing machine or dishwasher's delay timer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kwh | No | Energy the run uses, kWh (0-20), for its cost – on the energy label, or kW times hours. Leave out for no cost. | |
| export | No | How export is paid: `paired` (the tariff's own export tariff, default), `fixed` (with export_rate), `fit` (the Feed-in Tariff's deemed export: paid whatever is exported, so the sun used at home gives nothing up), `none`, or an export tariff's key from list_tariffs?direction=export (used where the tariff can have it, else its own). | |
| region | Yes | Agile region: a letter A-P or the slug from list_regions (eg `C` or `london`); list_regions lists well-known places in each. | |
| tariff | No | A tariff's key from list_tariffs (default `agile`), eg `go`, `edf-go-electric`, `eon-next-drive`. | agile |
| optimise | No | `cost` (default) or `carbon` (NESO's regional forecast, about two days ahead). | cost |
| finish_by | No | Local time it must finish by, HH:MM (default 07:00) – the next one at least `duration_hours` away. | 07:00 |
| solar_kwp | No | The home's solar panels, kWp (0.2-50): the answer then counts their forecast spare sun – see the docs' Solar panels section. | |
| export_rate | No | A fixed export rate, p/kWh (0-100). | |
| solar_pitch | No | Their angle from flat, degrees (0-90, default 35). | |
| solar_facing | No | The way they face: S, SE, SW, E, W, NE, NW or N – or a bearing in degrees (south is 180). Default S. | |
| duration_hours | No | How long it runs, 0.5-12 in half hours (default 3.5). | |
| solar_inverter_kw | No | The inverter's limit, kW (0.5-50), if smaller than the panels. |