amberelectric / public-api

Discuss the Amber public API
MIT License
47 stars 3 forks source link

Is ForecastInterval.range relative to ForecastInterval.perKwh or ForecastInterval.spotPerKwh ? #193

Closed CarlLusty closed 7 months ago

CarlLusty commented 7 months ago

I have noticed instances of ForecastInterval where ForecastInterval.perKwh is outside of ForecastInterval.range (when reported). For reference, I've included an example below.

The easy answer may be that I have assumed wrong and ForecastInterval.range refers to the potential value of ForecastInterval.spotPerKwh and not ForecastInterval.perKwh.

I checked the documentation but it isn't all that clear to me which it is. Docs:

Is ForecastInterval.range relative to ForecastInterval.perKwh or ForecastInterval.spotPerKwh?

Thanks, Carl.

{
   "channelType" : "general",
   "date" : "2024-03-01",
   "descriptor" : "low",
   "duration" : 30,
   "endTime" : "2024-02-29T21:00:00Z",
   "nemTime" : "2024-03-01T07:00:00+10:00",
   "perKwh" : 39.39479,
   "range" : {
      "max" : 33.1361,
      "min" : 12.80394
   },
   "renewables" : 20.1793485907705,
   "spikeStatus" : "none",
   "spotPerKwh" : 29.53254,
   "startTime" : "2024-02-29T20:30:01Z",
   "tariffInformation" : {
      "demandWindow" : false
   },
   "type" : "ForecastInterval"
},
madpilot commented 7 months ago

It's relative to the spot price

CarlLusty commented 7 months ago

Thanks.