API & Home Assistant
Integrating AgilePredict with your own tools
REST API

Forecast data is available as JSON at https://agilepredict.com/api/{REGION}. Optional query parameters:

days — days to download (default 14)
forecast_count — number of recent forecasts (default 1)
high_low — include p10/p90 bands (default True)
export — Agile Outgoing export prices (default False)

Examples:

  • Three most recent forecasts, 7 days, Region G, no bands:
    https://agilepredict.com/api/G?days=7&forecast_count=3&high_low=False
  • Export prices for Region G:
    https://agilepredict.com/api/G?days=7&export=true
  • Accuracy summary (accepts region and export):
    https://agilepredict.com/api/accuracy/?region=G&export=true
Home Assistant sensor

Add the following to configuration.yaml (or use the GitHub YAML files directly):

sensor: - platform: rest resource: https://agilepredict.com/api/G scan_interval: 3600 name: Agile Predict value_template: "{{ value_json[0]['name'] }}" json_attributes_path: "$[0]" json_attributes: - "created_at" - "prices"
Lovelace Apex Charts card

Requires the Apex Charts Card custom integration.

Home Assistant chart example
type: custom:apexcharts-card header: show: true show_states: true colorize_states: true graph_span: 7d yaxis: - id: price decimals: 0 span: start: day series: - entity: sensor.agile_predict yaxis_id: price name: Predicted Agile color: "#56B4E9" stroke_width: 3 unit: p/kWh data_generator: | return entity.attributes.prices.map((e) => { return [new Date(e.date_time), e.agile_pred]; });