Compare using previous day's Agile import tariff rates
Describe the bug The midnight run of the new (excellent) compare feature used yesterday's Agile import tariff rates.
Expected behaviour I would expect Predbat's compare feature that ran at midnight this morning to use today's Agile import tariff rates.
Predbat version v8.15.1
Environment details
- GivEnergy 9.5 kWh battery and 5kW hybrid inverter
- Standard HAOS installer
Screenshots
The left-hand side of the screenshot shows the start of the Agile import plan from today's midnight Compare results. The right-hand side of the screenshot shows yesterday's Agile import tariff downloaded from https://energy-stats.uk/download-historical-pricing-data/. They show that the import tariff rates used by Predbat Compare at midnight this morning were from yesterday.
Log file predbat.log Log attached from 2025-02-24 00:00 to 2025-02-24 00:30. Some entries of note: 2025-02-24 00:01:38.346517: Compare Tariff: Agile import/Fixed export 2025-02-24 00:01:41.093458: Download Octopus rates from https://api.octopus.energy/v1/products/AGILE-24-10-01/electricity-tariffs/E-1R-AGILE-24-10-01-M/standard-unit-rates/ 2025-02-24 00:01:41.093689: Return cached octopus data for https://api.octopus.energy/v1/products/AGILE-24-10-01/electricity-tariffs/E-1R-AGILE-24-10-01-M/standard-unit-rates/ age 0.1 minutes 2025-02-24 00:01:41.094461: Download Octopus rates from https://api.octopus.energy/v1/products/OUTGOING-VAR-24-10-26/electricity-tariffs/E-1R-OUTGOING-VAR-24-10-26-M/standard-unit-rates/ 2025-02-24 00:01:41.094618: Return cached octopus data for https://api.octopus.energy/v1/products/OUTGOING-VAR-24-10-26/electricity-tariffs/E-1R-OUTGOING-VAR-24-10-26-M/standard-unit-rates/ age 0.0 minutes
Predbat debug yaml file predbat_debug_11_20_00.yaml.txt Note, I manually ran the Compare feature at 11:25 (after I had produced the above debug file). This time Predbat Compare correctly used today's Agile import tariff prices.
Just a +1, i also see this . - However of course until 4pm using the nordpool rates, so running a compare isn't completely accurate - perhaps compare (for agile) should run when the new rates are published
Same here, the midnight automated run uses the previous day's Agile rates. A manual run after that uses the correct day
I think there is a caching problem that sometimes the Agile compare uses the prior days rates. I have sometimes seen this happen as well.
e.g. last night for me:
current (which is Agile/Fixed):
Agile (which should be the same):
logfile for this run:
And today's midnight run of the predbat compare has correctly found today's Agile prices both in the 'Current' and 'Agile/Fixed' comparisons.
Not changed the config at all and today it works. Yesterday it got the wrong rates.
Both of mine showing the previous days again
As a workaround I run switch.predbat_compare_active at 1am on an automation. maybe the manual run clears the cache before it starts?
I'm also seeing this problem and just wondering if it is a result of daylight saving. The API agile prices are given as GMT - so are currently 1 hour behind the BST times. That means the 00:00 to 00:30 price for the current day actually comes from the 23:00 to 23:30 price on the previous day in the API call. Having said all that I had the same problem in Feb which was before daylight savings came in.
Hi @springfall2008
Did you get a chance to look into this? It happened again last night, very visible as the Agile rates for Sunday were very low.
I’m on Agile + Fixed outgoing.
Compare of ‘current’ gives me the correct rates:
But compare of ‘agile+fixed’ gives the day before rates:
logfile:
comparisons.yaml: comparisons.log.yaml
@springfall2008 this is still regularly happening:
The left most blue line (current rates( should be the same length as the yellow/orange one (agile), but about half the time the compare uses the agile rates from the previous day, thus getting the compare wrong